X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=second%2Ffs_swap.c;h=1efb96e1d81278cc58a20e936517d4837b8c316d;hb=e915b0ad8c6b5a2fa25c59bd56ae752f8c2c799d;hp=cfa57094567550d3f8aff78a31722d9da016cb85;hpb=a01ba048668c5a7e5efa2aa41eeb0a3ed374a63a;p=yaboot.git diff --git a/second/fs_swap.c b/second/fs_swap.c index cfa5709..1efb96e 100644 --- a/second/fs_swap.c +++ b/second/fs_swap.c @@ -54,14 +54,15 @@ swap_open(struct boot_file_t* file, struct partition_t* part, int i; unsigned char *buffer; /* Make static to move into the BSS rather then the stack */ - static unsigned char device_name[1024]; + static char device_name[1024]; DEBUG_ENTER; DEBUG_OPEN; - if (file->device_kind != FILE_DEVICE_BLOCK || part == NULL) { - DEBUG_LEAVE(FILE_ERR_BADDEV); - return FILE_ERR_BADDEV; + if (part == NULL) { + DEBUG_F("No partions on %s, not checking for swap\n", device_name); + DEBUG_LEAVE(FILE_ERR_BAD_FSYS); + return FILE_ERR_BAD_FSYS; } /* We assume that device is "short" and is correctly NULL terminsated */