OSDN Git Service

Print desired mode when device opening fails.
authorrelan <relan@users.noreply.github.com>
Sun, 27 Nov 2011 09:49:37 +0000 (09:49 +0000)
committerrelan <relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:13 +0000 (08:26 +0300)
libexfat/io.c

index 3d63fa9..25988f0 100644 (file)
@@ -39,7 +39,8 @@ int exfat_open(const char* spec, int ro)
        fd = open(spec, ro ? O_RDONLY : O_RDWR);
        if (fd < 0)
        {
-               exfat_error("failed to open `%s'", spec);
+               exfat_error("failed to open `%s' in read-%s mode", spec,
+                               ro ? "only" : "write");
                return -1;
        }
        if (fstat(fd, &stbuf) != 0)