From e5ef74dfb2c6b8e00daf6afc7ac8895c626a59d9 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 23 Feb 2005 12:30:31 +0000 Subject: * 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. --- winsup/cygwin/fhandler.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'winsup/cygwin/fhandler.cc') diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 70cd4dbad..b2bacb5d3 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1211,6 +1211,9 @@ fhandler_base::fstat (struct __stat64 *buf) case FH_PIPER: buf->st_mode = S_IFIFO | STD_RBITS; break; + case FH_FULL: + buf->st_mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IWGRP | S_IWOTH; + break; default: buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH; break; -- cgit v1.2.3