From f2d5c57fd1204abeba9743159fd9aa9a0baa8069 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 28 Oct 1999 20:51:36 +0000 Subject: 1999-10-28 Roland McGrath * file_io.h: Include . (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. --- serverboot/file_io.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'serverboot/file_io.h') 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 + +/* 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_ */ -- cgit v1.2.3