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
commitfebab894f78d6cf509544872e075c3204d35b9d6 (patch)
tree9bfe9674f675e1078c8b25f7c64ff1ef6ac1e421 /serverboot/file_io.h
parent1a4ef01d300a7ad85cd44f2cba7528fb2e00ebfb (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_ */