From c1ef7bdd8d002ae0889efcf883d0e1b7faa938d4 Mon Sep 17 00:00:00 2001 From: Tim Riker Date: Wed, 25 Jan 2006 00:08:53 +0000 Subject: just whitespace --- e2fsprogs/blkid/blkid.h | 8 ++-- e2fsprogs/blkid/blkid_getsize.c | 2 +- e2fsprogs/blkid/cache.c | 10 ++--- e2fsprogs/blkid/dev.c | 2 +- e2fsprogs/blkid/devname.c | 4 +- e2fsprogs/blkid/devno.c | 4 +- e2fsprogs/blkid/probe.c | 98 ++++++++++++++++++++--------------------- e2fsprogs/blkid/probe.h | 12 ++--- e2fsprogs/blkid/read.c | 4 +- e2fsprogs/blkid/resolve.c | 4 +- e2fsprogs/blkid/save.c | 2 +- e2fsprogs/blkid/tag.c | 18 ++++---- 12 files changed, 84 insertions(+), 84 deletions(-) (limited to 'e2fsprogs/blkid') diff --git a/e2fsprogs/blkid/blkid.h b/e2fsprogs/blkid/blkid.h index 3ea94ac80..3bb0e78d8 100644 --- a/e2fsprogs/blkid/blkid.h +++ b/e2fsprogs/blkid/blkid.h @@ -34,13 +34,13 @@ typedef struct blkid_struct_dev_iterate *blkid_dev_iterate; * Flags for blkid_get_dev * * BLKID_DEV_CREATE Create an empty device structure if not found - * in the cache. + * in the cache. * BLKID_DEV_VERIFY Make sure the device structure corresponds - * with reality. + * with reality. * BLKID_DEV_FIND Just look up a device entry, and return NULL - * if it is not found. + * if it is not found. * BLKID_DEV_NORMAL Get a valid device structure, either from the - * cache or by probing the device. + * cache or by probing the device. */ #define BLKID_DEV_FIND 0x0000 #define BLKID_DEV_CREATE 0x0001 diff --git a/e2fsprogs/blkid/blkid_getsize.c b/e2fsprogs/blkid/blkid_getsize.c index 9458c08bf..58cc7352a 100644 --- a/e2fsprogs/blkid/blkid_getsize.c +++ b/e2fsprogs/blkid/blkid_getsize.c @@ -70,7 +70,7 @@ blkid_loff_t blkid_get_dev_size(int fd) { int valid_blkgetsize64 = 1; #ifdef __linux__ - struct utsname ut; + struct utsname ut; #endif unsigned long long size64; unsigned long size; diff --git a/e2fsprogs/blkid/cache.c b/e2fsprogs/blkid/cache.c index 0dd1b6286..87be1269f 100644 --- a/e2fsprogs/blkid/cache.c +++ b/e2fsprogs/blkid/cache.c @@ -47,9 +47,9 @@ int blkid_get_cache(blkid_cache *ret_cache, const char *filename) if (!filename) filename = BLKID_CACHE_FILE; cache->bic_filename = blkid_strdup(filename); - + blkid_read_cache(cache); - + *ret_cache = cache; return 0; } @@ -62,7 +62,7 @@ void blkid_put_cache(blkid_cache cache) (void) blkid_flush_cache(cache); DBG(DEBUG_CACHE, printf("freeing cache struct\n")); - + /* DEB_DUMP_CACHE(cache); */ while (!list_empty(&cache->bic_devs)) { @@ -79,7 +79,7 @@ void blkid_put_cache(blkid_cache cache) while (!list_empty(&tag->bit_names)) { blkid_tag bad = list_entry(tag->bit_names.next, - struct blkid_struct_tag, + struct blkid_struct_tag, bit_names); DBG(DEBUG_CACHE, printf("warning: unfreed tag %s=%s\n", @@ -90,7 +90,7 @@ void blkid_put_cache(blkid_cache cache) } if (cache->bic_filename) free(cache->bic_filename); - + free(cache); } diff --git a/e2fsprogs/blkid/dev.c b/e2fsprogs/blkid/dev.c index 0e2b4e1bc..d2e468304 100644 --- a/e2fsprogs/blkid/dev.c +++ b/e2fsprogs/blkid/dev.c @@ -73,7 +73,7 @@ extern const char *blkid_dev_devname(blkid_dev dev) * This series of functions iterate over all devices in a blkid cache */ #define DEV_ITERATE_MAGIC 0x01a5284c - + struct blkid_struct_dev_iterate { int magic; blkid_cache cache; diff --git a/e2fsprogs/blkid/devname.c b/e2fsprogs/blkid/devname.c index b5db29e30..1e016a55d 100644 --- a/e2fsprogs/blkid/devname.c +++ b/e2fsprogs/blkid/devname.c @@ -54,7 +54,7 @@ blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, int flags) if (strcmp(tmp->bid_name, devname)) continue; - DBG(DEBUG_DEVNAME, + DBG(DEBUG_DEVNAME, printf("found devname %s in cache\n", tmp->bid_name)); dev = tmp; break; @@ -113,7 +113,7 @@ static void probe_one(blkid_cache cache, const char *ptname, dev->bid_devno == devno) goto set_pri; - if (stat(device, &st) == 0 && S_ISBLK(st.st_mode) && + if (stat(device, &st) == 0 && S_ISBLK(st.st_mode) && st.st_rdev == devno) { devname = blkid_strdup(device); break; diff --git a/e2fsprogs/blkid/devno.c b/e2fsprogs/blkid/devno.c index 93a57fd86..7d083e76f 100644 --- a/e2fsprogs/blkid/devno.c +++ b/e2fsprogs/blkid/devno.c @@ -171,13 +171,13 @@ char *blkid_devno_to_devname(dev_t devno) if (!devname) { DBG(DEBUG_DEVNO, - printf("blkid: couldn't find devno 0x%04lx\n", + printf("blkid: couldn't find devno 0x%04lx\n", (unsigned long) devno)); } else { DBG(DEBUG_DEVNO, printf("found devno 0x%04Lx as %s\n", devno, devname)); } - + return devname; } diff --git a/e2fsprogs/blkid/probe.c b/e2fsprogs/blkid/probe.c index cb21c1070..2aaa50885 100644 --- a/e2fsprogs/blkid/probe.c +++ b/e2fsprogs/blkid/probe.c @@ -41,7 +41,7 @@ static int check_mdraid(int fd, unsigned char *ret_uuid) struct mdp_superblock_s *md; blkid_loff_t offset; char buf[4096]; - + if (fd < 0) return -BLKID_ERR_PARAM; @@ -83,7 +83,7 @@ static void get_ext2_info(blkid_dev dev, unsigned char *buf) struct ext2_super_block *es = (struct ext2_super_block *) buf; const char *label = 0; - DBG(DEBUG_PROBE, printf("ext2_sb.compat = %08X:%08X:%08X\n", + DBG(DEBUG_PROBE, printf("ext2_sb.compat = %08X:%08X:%08X\n", blkid_le32(es->s_feature_compat), blkid_le32(es->s_feature_incompat), blkid_le32(es->s_feature_ro_compat))); @@ -95,8 +95,8 @@ static void get_ext2_info(blkid_dev dev, unsigned char *buf) set_uuid(dev, es->s_uuid); } -static int probe_ext3(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), +static int probe_ext3(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev, const struct blkid_magic *id, unsigned char *buf) { @@ -105,7 +105,7 @@ static int probe_ext3(int fd __BLKID_ATTR((unused)), es = (struct ext2_super_block *)buf; /* Distinguish between jbd and ext2/3 fs */ - if (blkid_le32(es->s_feature_incompat) & + if (blkid_le32(es->s_feature_incompat) & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) return -BLKID_ERR_PARAM; @@ -121,8 +121,8 @@ static int probe_ext3(int fd __BLKID_ATTR((unused)), return 0; } -static int probe_ext2(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), +static int probe_ext2(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev, const struct blkid_magic *id, unsigned char *buf) { @@ -132,7 +132,7 @@ static int probe_ext2(int fd __BLKID_ATTR((unused)), es = (struct ext2_super_block *)buf; /* Distinguish between jbd and ext2/3 fs */ - if (blkid_le32(es->s_feature_incompat) & + if (blkid_le32(es->s_feature_incompat) & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) return -BLKID_ERR_PARAM; @@ -141,10 +141,10 @@ static int probe_ext2(int fd __BLKID_ATTR((unused)), return 0; } -static int probe_jbd(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), - blkid_dev dev, - const struct blkid_magic *id __BLKID_ATTR((unused)), +static int probe_jbd(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), + blkid_dev dev, + const struct blkid_magic *id __BLKID_ATTR((unused)), unsigned char *buf) { struct ext2_super_block *es = (struct ext2_super_block *) buf; @@ -158,10 +158,10 @@ static int probe_jbd(int fd __BLKID_ATTR((unused)), return 0; } -static int probe_vfat(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), +static int probe_vfat(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev, - const struct blkid_magic *id __BLKID_ATTR((unused)), + const struct blkid_magic *id __BLKID_ATTR((unused)), unsigned char *buf) { struct vfat_super_block *vs; @@ -191,10 +191,10 @@ static int probe_vfat(int fd __BLKID_ATTR((unused)), return 0; } -static int probe_msdos(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), +static int probe_msdos(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev, - const struct blkid_magic *id __BLKID_ATTR((unused)), + const struct blkid_magic *id __BLKID_ATTR((unused)), unsigned char *buf) { struct msdos_super_block *ms = (struct msdos_super_block *) buf; @@ -223,10 +223,10 @@ static int probe_msdos(int fd __BLKID_ATTR((unused)), return 0; } -static int probe_xfs(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), +static int probe_xfs(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev, - const struct blkid_magic *id __BLKID_ATTR((unused)), + const struct blkid_magic *id __BLKID_ATTR((unused)), unsigned char *buf) { struct xfs_super_block *xs; @@ -241,8 +241,8 @@ static int probe_xfs(int fd __BLKID_ATTR((unused)), return 0; } -static int probe_reiserfs(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), +static int probe_reiserfs(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev, const struct blkid_magic *id, unsigned char *buf) { @@ -268,10 +268,10 @@ static int probe_reiserfs(int fd __BLKID_ATTR((unused)), return 0; } -static int probe_jfs(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), +static int probe_jfs(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev, - const struct blkid_magic *id __BLKID_ATTR((unused)), + const struct blkid_magic *id __BLKID_ATTR((unused)), unsigned char *buf) { struct jfs_super_block *js; @@ -286,10 +286,10 @@ static int probe_jfs(int fd __BLKID_ATTR((unused)), return 0; } -static int probe_romfs(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), +static int probe_romfs(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev, - const struct blkid_magic *id __BLKID_ATTR((unused)), + const struct blkid_magic *id __BLKID_ATTR((unused)), unsigned char *buf) { struct romfs_super_block *ros; @@ -340,7 +340,7 @@ static int probe_swap1(int fd, /* arbitrary sanity check.. is there any garbage down there? */ if (sws->sws_pad[32] == 0 && sws->sws_pad[33] == 0) { if (sws->sws_volume[0]) - blkid_set_tag(dev, "LABEL", sws->sws_volume, + blkid_set_tag(dev, "LABEL", sws->sws_volume, sizeof(sws->sws_volume)); if (sws->sws_uuid[0]) set_uuid(dev, sws->sws_uuid); @@ -354,9 +354,9 @@ static const char * const udf_magic[] = { "BEA01", "BOOT2", "CD001", "CDW02", "NSR02", "NSR03", "TEA01", 0 }; -static int probe_udf(int fd, blkid_cache cache __BLKID_ATTR((unused)), +static int probe_udf(int fd, blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev __BLKID_ATTR((unused)), - const struct blkid_magic *id __BLKID_ATTR((unused)), + const struct blkid_magic *id __BLKID_ATTR((unused)), unsigned char *buf __BLKID_ATTR((unused))) { int j, bs; @@ -396,10 +396,10 @@ static int probe_udf(int fd, blkid_cache cache __BLKID_ATTR((unused)), return 1; } -static int probe_ocfs(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), +static int probe_ocfs(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev, - const struct blkid_magic *id __BLKID_ATTR((unused)), + const struct blkid_magic *id __BLKID_ATTR((unused)), unsigned char *buf) { struct ocfs_volume_header ovh; @@ -414,17 +414,17 @@ static int probe_ocfs(int fd __BLKID_ATTR((unused)), blkid_set_tag(dev,"SEC_TYPE","ocfs1",sizeof("ocfs1")); else if (major >= 9) blkid_set_tag(dev,"SEC_TYPE","ntocfs",sizeof("ntocfs")); - + blkid_set_tag(dev, "LABEL", ovl.label, ocfslabellen(ovl)); blkid_set_tag(dev, "MOUNT", ovh.mount, ocfsmountlen(ovh)); set_uuid(dev, ovl.vol_id); return 0; } -static int probe_ocfs2(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), +static int probe_ocfs2(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev, - const struct blkid_magic *id __BLKID_ATTR((unused)), + const struct blkid_magic *id __BLKID_ATTR((unused)), unsigned char *buf) { struct ocfs2_super_block *osb; @@ -436,10 +436,10 @@ static int probe_ocfs2(int fd __BLKID_ATTR((unused)), return 0; } -static int probe_oracleasm(int fd __BLKID_ATTR((unused)), - blkid_cache cache __BLKID_ATTR((unused)), +static int probe_oracleasm(int fd __BLKID_ATTR((unused)), + blkid_cache cache __BLKID_ATTR((unused)), blkid_dev dev, - const struct blkid_magic *id __BLKID_ATTR((unused)), + const struct blkid_magic *id __BLKID_ATTR((unused)), unsigned char *buf) { struct oracle_asm_disk_label *dl; @@ -548,13 +548,13 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) diff = now - dev->bid_time; if ((now < dev->bid_time) || - (diff < BLKID_PROBE_MIN) || + (diff < BLKID_PROBE_MIN) || (dev->bid_flags & BLKID_BID_FL_VERIFIED && diff < BLKID_PROBE_INTERVAL)) return dev; DBG(DEBUG_PROBE, - printf("need to revalidate %s (time since last check %lu)\n", + printf("need to revalidate %s (time since last check %lu)\n", dev->bid_name, diff)); if (((fd = open(dev->bid_name, O_RDONLY)) < 0) || @@ -571,12 +571,12 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev) } memset(bufs, 0, sizeof(bufs)); - + /* * Iterate over the type array. If we already know the type, * then try that first. If it doesn't work, then blow away * the type information, and try again. - * + * */ try_again: type = 0; @@ -637,7 +637,7 @@ try_again: blkid_free_dev(dev); return NULL; } - + found_type: if (dev && type) { dev->bid_devno = st.st_rdev; @@ -646,7 +646,7 @@ found_type: cache->bic_flags |= BLKID_BIC_FL_CHANGED; blkid_set_tag(dev, "TYPE", type, 0); - + DBG(DEBUG_PROBE, printf("%s: devno 0x%04Lx, type %s\n", dev->bid_name, st.st_rdev, type)); } @@ -696,7 +696,7 @@ int main(int argc, char **argv) printf("\tlabel is '%s'\n", dev->bid_label); if (dev->bid_uuid) printf("\tuuid is %s\n", dev->bid_uuid); - + blkid_free_dev(dev); return (0); } diff --git a/e2fsprogs/blkid/probe.h b/e2fsprogs/blkid/probe.h index 10af5d518..530b8efe2 100644 --- a/e2fsprogs/blkid/probe.h +++ b/e2fsprogs/blkid/probe.h @@ -18,7 +18,7 @@ struct blkid_magic; -typedef int (*blkid_probe_t)(int fd, blkid_cache cache, blkid_dev dev, +typedef int (*blkid_probe_t)(int fd, blkid_cache cache, blkid_dev dev, const struct blkid_magic *id, unsigned char *buf); struct blkid_magic { @@ -222,16 +222,16 @@ struct ocfs_volume_header { struct ocfs_volume_label { unsigned char disk_lock[48]; - unsigned char label[64]; + unsigned char label[64]; unsigned char label_len[2]; unsigned char vol_id[16]; unsigned char vol_id_len[2]; }; #define ocfsmajor(o) ((__u32)o.major_version[0] \ - + (((__u32) o.major_version[1]) << 8) \ - + (((__u32) o.major_version[2]) << 16) \ - + (((__u32) o.major_version[3]) << 24)) + + (((__u32) o.major_version[1]) << 8) \ + + (((__u32) o.major_version[2]) << 16) \ + + (((__u32) o.major_version[3]) << 24)) #define ocfslabellen(o) ((__u32)o.label_len[0] + (((__u32) o.label_len[1]) << 8)) #define ocfsmountlen(o) ((__u32)o.mount_len[0] + (((__u32) o.mount_len[1])<<8)) @@ -334,7 +334,7 @@ _INLINE_ __u64 blkid_swab64(__u64 val) return (blkid_swab32(val >> 32) | (((__u64) blkid_swab32(val & 0xFFFFFFFFUL)) << 32)); } -#endif +#endif diff --git a/e2fsprogs/blkid/read.c b/e2fsprogs/blkid/read.c index 78464145d..08a3162f3 100644 --- a/e2fsprogs/blkid/read.c +++ b/e2fsprogs/blkid/read.c @@ -302,7 +302,7 @@ static int parse_tag(blkid_cache cache, blkid_dev dev, char **cp) return ret; /* Some tags are stored directly in the device struct */ - if (!strcmp(name, "DEVNO")) + if (!strcmp(name, "DEVNO")) dev->bid_devno = STRTOULL(value, 0, 0); else if (!strcmp(name, "PRI")) dev->bid_pri = strtol(value, 0, 0); @@ -389,7 +389,7 @@ void blkid_read_cache(blkid_cache cache) cache->bic_filename)); goto errout; } - + DBG(DEBUG_CACHE, printf("reading cache file %s\n", cache->bic_filename)); diff --git a/e2fsprogs/blkid/resolve.c b/e2fsprogs/blkid/resolve.c index 625782d44..591b63057 100644 --- a/e2fsprogs/blkid/resolve.c +++ b/e2fsprogs/blkid/resolve.c @@ -69,7 +69,7 @@ char *blkid_get_devname(blkid_cache cache, const char *token, if (!token) return NULL; - + if (!cache) { if (blkid_get_cache(&c, NULL) < 0) return NULL; @@ -125,7 +125,7 @@ int main(int argc, char **argv) fprintf(stderr, "Couldn't get blkid cache\n"); exit(1); } - + if (argv[2]) { value = blkid_get_tag_value(cache, argv[1], argv[2]); printf("%s has tag %s=%s\n", argv[2], argv[1], diff --git a/e2fsprogs/blkid/save.c b/e2fsprogs/blkid/save.c index 3fba2450a..cc406ebfb 100644 --- a/e2fsprogs/blkid/save.c +++ b/e2fsprogs/blkid/save.c @@ -176,7 +176,7 @@ int main(int argc, char **argv) exit(1); } cache->bic_filename = blkid_strdup(argv[1]); - + if ((ret = blkid_flush_cache(cache)) < 0) { fprintf(stderr, "error (%d) saving cache\n", ret); exit(1); diff --git a/e2fsprogs/blkid/tag.c b/e2fsprogs/blkid/tag.c index 699d0fb46..e2c785cf0 100644 --- a/e2fsprogs/blkid/tag.c +++ b/e2fsprogs/blkid/tag.c @@ -96,7 +96,7 @@ static blkid_tag blkid_find_head_cache(blkid_cache cache, const char *type) /* * Set a tag on an existing device. - * + * * If value is NULL, then delete the tagsfrom the device. */ int blkid_set_tag(blkid_dev dev, const char *name, @@ -131,7 +131,7 @@ int blkid_set_tag(blkid_dev dev, const char *name, t->bit_dev = dev; list_add_tail(&t->bit_tags, &dev->bid_tags); - + if (dev->bid_cache) { head = blkid_find_head_cache(dev->bid_cache, t->bit_name); @@ -151,7 +151,7 @@ int blkid_set_tag(blkid_dev dev, const char *name, list_add_tail(&t->bit_names, &head->bit_names); } } - + /* Link common tags directly to the device struct */ if (!strcmp(name, "TYPE")) dev->bid_type = val; @@ -159,7 +159,7 @@ int blkid_set_tag(blkid_dev dev, const char *name, dev->bid_label = val; else if (!strcmp(name, "UUID")) dev->bid_uuid = val; - + if (dev->bid_cache) dev->bid_cache->bic_flags |= BLKID_BIC_FL_CHANGED; return 0; @@ -235,7 +235,7 @@ errout: * This series of functions iterate over all tags in a device */ #define TAG_ITERATE_MAGIC 0x01a5284c - + struct blkid_struct_tag_iterate { int magic; blkid_dev dev; @@ -260,7 +260,7 @@ extern int blkid_tag_next(blkid_tag_iterate iter, const char **type, const char **value) { blkid_tag tag; - + *type = 0; *value = 0; if (!iter || iter->magic != TAG_ITERATE_MAGIC || @@ -303,9 +303,9 @@ extern blkid_dev blkid_find_dev_with_tag(blkid_cache cache, return NULL; blkid_read_cache(cache); - + DBG(DEBUG_TAG, printf("looking for %s=%s in cache\n", type, value)); - + try_again: pri = -1; dev = 0; @@ -313,7 +313,7 @@ try_again: if (head) { list_for_each(p, &head->bit_names) { - blkid_tag tmp = list_entry(p, struct blkid_struct_tag, + blkid_tag tmp = list_entry(p, struct blkid_struct_tag, bit_names); if (!strcmp(tmp->bit_val, value) && -- cgit v1.2.3