X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=include%2Ffile.h;h=f395dc8b66fe3006d7a51be2c25564b4545b54ab;hb=678d83ff8608534ece0f1e912eddedef4f0bb67a;hp=c68d84f66eeec8e0cbd08efd7806fc2923450a79;hpb=f4ebbd9f7ea23e3f0fcbe098754580c220894628;p=yaboot.git diff --git a/include/file.h b/include/file.h index c68d84f..f395dc8 100644 --- a/include/file.h +++ b/include/file.h @@ -31,22 +31,6 @@ struct boot_file_t; #define FILE_MAX_PATH 1024 -/* Simple error codes */ -#define FILE_ERR_OK 0 -#define FILE_ERR_EOF -1 -#define FILE_ERR_NOTFOUND -2 -#define FILE_CANT_SEEK -3 -#define FILE_IOERR -4 -#define FILE_BAD_PATH -5 -#define FILE_ERR_BAD_TYPE -6 -#define FILE_ERR_BAD_FSYS -7 -#define FILE_ERR_SYMLINK_LOOP -8 -#define FILE_ERR_LENGTH -9 - -/* Device kind */ -#define FILE_DEVICE_BLOCK 1 -#define FILE_DEVICE_NET 2 - struct boot_fspec_t { char* dev; /* OF device path */ int part; /* Partition number or -1 */ @@ -73,18 +57,13 @@ struct boot_file_t { // unsigned int part_count; }; -extern int open_file( const struct boot_fspec_t* spec, - struct boot_file_t* file); - -extern int validate_fspec( - struct boot_fspec_t* spec, - char* default_device, - int default_part); -extern char *parse_device_path( - char* of_device, - char** file_spec, - int* partition); +extern int +open_file(const struct boot_fspec_t* spec, + struct boot_file_t* file); +extern int +parse_device_path(char *imagepath, char *defdevice, int defpart, + char *deffile, struct boot_fspec_t *result); #endif