summaryrefslogtreecommitdiff
path: root/serverboot/file_io.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-10-28 20:51:36 +0000
committerRoland McGrath <roland@gnu.org>1999-10-28 20:51:36 +0000
commitf2d5c57fd1204abeba9743159fd9aa9a0baa8069 (patch)
tree8a186e2ec82290568ae348a5a7c8f8fc1067ba08 /serverboot/file_io.h
parent54798bc817bdce192b874db8541bb73c6fb7a2ad (diff)
1999-10-28 Roland McGrath <roland@baalperazim.frob.com>
* file_io.h: Include <errno.h>. (FS_* macros): Define these to equivalent errno codes. * def_pager_setup.c (add_paging_file): Put strerror of result code in error messages. * bootstrap.c (parse_script): Likewise. * load.c (boot_script_exec_cmd): Include NAMEBUF in error messages, and use strerror to format result code. * panic.c (panic): Use program_invocation_name in message.
Diffstat (limited to 'serverboot/file_io.h')
-rw-r--r--serverboot/file_io.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/serverboot/file_io.h b/serverboot/file_io.h
index 5706ce5b..8a1a6e34 100644
--- a/serverboot/file_io.h
+++ b/serverboot/file_io.h
@@ -162,13 +162,30 @@ extern int page_write_file_direct();
* Error codes for file system errors.
*/
+#include <errno.h>
+
+/* Just use the damn Hurd error numbers. This is old CMU/Utah code from
+ the days of personality-independent Mach where it made sense for this to
+ be a standalone universe. In the Hurd, we compile serverboot against
+ the regular C library anyway. */
+
+#define FS_NOT_DIRECTORY ENOTDIR
+#define FS_NO_ENTRY ENOENT
+#define FS_NAME_TOO_LONG ENAMETOOLONG
+#define FS_SYMLINK_LOOP ELOOP
+#define FS_INVALID_FS EFTYPE /* ? */
+#define FS_NOT_IN_FILE EINVAL
+#define FS_INVALID_PARAMETER EINVAL
+
+#if 0
#define FS_NOT_DIRECTORY 5000 /* not a directory */
#define FS_NO_ENTRY 5001 /* name not found */
#define FS_NAME_TOO_LONG 5002 /* name too long */
#define FS_SYMLINK_LOOP 5003 /* symbolic link loop */
#define FS_INVALID_FS 5004 /* bad file system */
#define FS_NOT_IN_FILE 5005 /* offset not in file */
-#define FS_INVALID_PARAMETER 5006 /* bad parameter to
- a routine */
+#define FS_INVALID_PARAMETER 5006 /* bad parameter to routine */
+#endif
+
#endif /* _FILE_IO_H_ */