* devices.h: Switch FH_ZERO and FH_PORT as on Linux. Add FH_FULL.
* devices.in: Add /dev/full. * devices.cc: Regenerate. * dtable.cc (build_fh_pc): Add FH_FULL. * fhandler.cc (fhandler_base::fstat): Set FH_FULL permission bits correctly. * fhandler_zero.cc (fhandler_dev_zero::write): Set errno to ENOSPC and return -1 if device is FH_FULL.
This commit is contained in:
		| @@ -34,6 +34,11 @@ fhandler_dev_zero::open (int flags, mode_t) | ||||
| int | ||||
| fhandler_dev_zero::write (const void *, size_t len) | ||||
| { | ||||
|   if (get_device () == FH_FULL) | ||||
|     { | ||||
|       set_errno (ENOSPC); | ||||
|       return -1; | ||||
|     } | ||||
|   return len; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user