From eca4ae8fb316ad5ef7f190917bcac4accffc3301 Mon Sep 17 00:00:00 2001 From: relan Date: Sun, 1 Jun 2014 19:53:48 +0000 Subject: [PATCH] Use apostrophe for both opening and closing quotes in messages. This is a recommendation from GNU Coding Standards. --- dump/main.c | 4 ++-- fsck/main.c | 8 ++++---- fuse/main.c | 4 ++-- libexfat/io.c | 16 ++++++++-------- libexfat/node.c | 12 ++++++------ mkfs/main.c | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dump/main.c b/dump/main.c index 7ef571d..d91b9a0 100644 --- a/dump/main.c +++ b/dump/main.c @@ -85,13 +85,13 @@ static int dump_sb(const char* spec) if (exfat_read(dev, &sb, sizeof(struct exfat_super_block)) < 0) { exfat_close(dev); - exfat_error("failed to read from `%s'", spec); + exfat_error("failed to read from '%s'", spec); return 1; } if (memcmp(sb.oem_name, "EXFAT ", sizeof(sb.oem_name)) != 0) { exfat_close(dev); - exfat_error("exFAT file system is not found on `%s'", spec); + exfat_error("exFAT file system is not found on '%s'", spec); return 1; } diff --git a/fsck/main.c b/fsck/main.c index bb716e8..30bc4c8 100644 --- a/fsck/main.c +++ b/fsck/main.c @@ -45,7 +45,7 @@ static int nodeck(struct exfat* ef, struct exfat_node* node) char name[UTF8_BYTES(EXFAT_NAME_MAX) + 1]; exfat_get_name(node, name, sizeof(name) - 1); - exfat_error("file `%s' has invalid cluster 0x%x", name, c); + exfat_error("file '%s' has invalid cluster 0x%x", name, c); rc = 1; break; } @@ -54,7 +54,7 @@ static int nodeck(struct exfat* ef, struct exfat_node* node) char name[UTF8_BYTES(EXFAT_NAME_MAX) + 1]; exfat_get_name(node, name, sizeof(name) - 1); - exfat_error("cluster 0x%x of file `%s' is not allocated", c, name); + exfat_error("cluster 0x%x of file '%s' is not allocated", c, name); rc = 1; } c = exfat_next_cluster(ef, node, c); @@ -72,9 +72,9 @@ static void dirck(struct exfat* ef, const char* path) char* entry_path; if (exfat_lookup(ef, &parent, path) != 0) - exfat_bug("directory `%s' is not found", path); + exfat_bug("directory '%s' is not found", path); if (!(parent->flags & EXFAT_ATTRIB_DIR)) - exfat_bug("`%s' is not a directory (0x%x)", path, parent->flags); + exfat_bug("'%s' is not a directory (0x%x)", path, parent->flags); if (nodeck(ef, parent) != 0) { exfat_put_node(ef, parent); diff --git a/fuse/main.c b/fuse/main.c index 2f157c4..1948a16 100644 --- a/fuse/main.c +++ b/fuse/main.c @@ -111,7 +111,7 @@ static int fuse_exfat_readdir(const char* path, void* buffer, if (!(parent->flags & EXFAT_ATTRIB_DIR)) { exfat_put_node(&ef, parent); - exfat_error("`%s' is not a directory (0x%x)", path, parent->flags); + exfat_error("'%s' is not a directory (0x%x)", path, parent->flags); return -ENOTDIR; } @@ -122,7 +122,7 @@ static int fuse_exfat_readdir(const char* path, void* buffer, if (rc != 0) { exfat_put_node(&ef, parent); - exfat_error("failed to open directory `%s'", path); + exfat_error("failed to open directory '%s'", path); return rc; } while ((node = exfat_readdir(&ef, &it))) diff --git a/libexfat/io.c b/libexfat/io.c index 5a84ec4..05fac61 100644 --- a/libexfat/io.c +++ b/libexfat/io.c @@ -100,7 +100,7 @@ struct exfat_dev* exfat_open(const char* spec, enum exfat_mode mode) if (dev->fd == -1) { free(dev); - exfat_error("failed to open `%s' in read-only mode", spec); + exfat_error("failed to open '%s' in read-only mode", spec); return NULL; } dev->mode = EXFAT_MODE_RO; @@ -110,7 +110,7 @@ struct exfat_dev* exfat_open(const char* spec, enum exfat_mode mode) if (dev->fd == -1) { free(dev); - exfat_error("failed to open `%s' in read-write mode", spec); + exfat_error("failed to open '%s' in read-write mode", spec); return NULL; } dev->mode = EXFAT_MODE_RW; @@ -126,11 +126,11 @@ struct exfat_dev* exfat_open(const char* spec, enum exfat_mode mode) if (dev->fd != -1) { dev->mode = EXFAT_MODE_RO; - exfat_warn("`%s' is write-protected, mounting read-only", spec); + exfat_warn("'%s' is write-protected, mounting read-only", spec); break; } free(dev); - exfat_error("failed to open `%s'", spec); + exfat_error("failed to open '%s'", spec); return NULL; } @@ -138,7 +138,7 @@ struct exfat_dev* exfat_open(const char* spec, enum exfat_mode mode) { close(dev->fd); free(dev); - exfat_error("failed to fstat `%s'", spec); + exfat_error("failed to fstat '%s'", spec); return NULL; } if (!S_ISBLK(stbuf.st_mode) && @@ -147,7 +147,7 @@ struct exfat_dev* exfat_open(const char* spec, enum exfat_mode mode) { close(dev->fd); free(dev); - exfat_error("`%s' is neither a device, nor a regular file", spec); + exfat_error("'%s' is neither a device, nor a regular file", spec); return NULL; } @@ -208,14 +208,14 @@ struct exfat_dev* exfat_open(const char* spec, enum exfat_mode mode) { close(dev->fd); free(dev); - exfat_error("failed to get size of `%s'", spec); + exfat_error("failed to get size of '%s'", spec); return NULL; } if (exfat_seek(dev, 0, SEEK_SET) == -1) { close(dev->fd); free(dev); - exfat_error("failed to seek to the beginning of `%s'", spec); + exfat_error("failed to seek to the beginning of '%s'", spec); return NULL; } } diff --git a/libexfat/node.c b/libexfat/node.c index 4020874..f3207fb 100644 --- a/libexfat/node.c +++ b/libexfat/node.c @@ -50,14 +50,14 @@ void exfat_put_node(struct exfat* ef, struct exfat_node* node) if (node->references < 0) { exfat_get_name(node, buffer, sizeof(buffer) - 1); - exfat_bug("reference counter of `%s' is below zero", buffer); + exfat_bug("reference counter of '%s' is below zero", buffer); } else if (node->references == 0 && node != ef->root) { if (node->flags & EXFAT_ATTRIB_DIRTY) { exfat_get_name(node, buffer, sizeof(buffer) - 1); - exfat_warn("dirty node `%s' with zero references", buffer); + exfat_warn("dirty node '%s' with zero references", buffer); } } } @@ -205,7 +205,7 @@ static bool check_node(const struct exfat_node* node, uint16_t actual_checksum, if (actual_checksum != reference_checksum) { exfat_get_name(node, buffer, sizeof(buffer) - 1); - exfat_error("`%s' has invalid checksum (%#hx != %#hx)", buffer, + exfat_error("'%s' has invalid checksum (%#hx != %#hx)", buffer, actual_checksum, reference_checksum); return false; } @@ -217,7 +217,7 @@ static bool check_node(const struct exfat_node* node, uint16_t actual_checksum, if (real_size > node->size) { exfat_get_name(node, buffer, sizeof(buffer) - 1); - exfat_error("`%s' has real size (%"PRIu64") greater than size " + exfat_error("'%s' has real size (%"PRIu64") greater than size " "(%"PRIu64")", buffer, real_size, node->size); return false; } @@ -554,13 +554,13 @@ static void reset_cache(struct exfat* ef, struct exfat_node* node) if (node->references != 0) { exfat_get_name(node, buffer, sizeof(buffer) - 1); - exfat_warn("non-zero reference counter (%d) for `%s'", + exfat_warn("non-zero reference counter (%d) for '%s'", node->references, buffer); } if (node != ef->root && (node->flags & EXFAT_ATTRIB_DIRTY)) { exfat_get_name(node, buffer, sizeof(buffer) - 1); - exfat_bug("node `%s' is dirty", buffer); + exfat_bug("node '%s' is dirty", buffer); } while (node->references) exfat_put_node(ef, node); diff --git a/mkfs/main.c b/mkfs/main.c index 8473a73..12d8f42 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -224,7 +224,7 @@ int main(int argc, char* argv[]) spc_bits = logarithm2(atoi(optarg)); if (spc_bits < 0) { - exfat_error("invalid option value: `%s'", optarg); + exfat_error("invalid option value: '%s'", optarg); return 1; } break; -- 2.11.0