summaryrefslogtreecommitdiff
path: root/lib/blkid
diff options
context:
space:
mode:
Diffstat (limited to 'lib/blkid')
-rw-r--r--lib/blkid/blkid.h2
-rw-r--r--lib/blkid/cache.c16
-rw-r--r--lib/blkid/dev.c12
-rw-r--r--lib/blkid/devname.c10
-rw-r--r--lib/blkid/devno.c6
-rw-r--r--lib/blkid/getsize.c2
-rw-r--r--lib/blkid/probe.c98
-rw-r--r--lib/blkid/probe.h12
-rw-r--r--lib/blkid/read.c6
-rw-r--r--lib/blkid/resolve.c4
-rw-r--r--lib/blkid/save.c2
-rw-r--r--lib/blkid/tag.c30
-rw-r--r--lib/blkid/tst_types.c2
13 files changed, 101 insertions, 101 deletions
diff --git a/lib/blkid/blkid.h b/lib/blkid/blkid.h
index f38a2350..81f3098c 100644
--- a/lib/blkid/blkid.h
+++ b/lib/blkid/blkid.h
@@ -90,7 +90,7 @@ extern blkid_tag_iterate blkid_tag_iterate_begin(blkid_dev dev);
extern int blkid_tag_next(blkid_tag_iterate iterate,
const char **type, const char **value);
extern void blkid_tag_iterate_end(blkid_tag_iterate iterate);
-extern int blkid_dev_has_tag(blkid_dev dev, const char *type,
+extern int blkid_dev_has_tag(blkid_dev dev, const char *type,
const char *value);
extern blkid_dev blkid_find_dev_with_tag(blkid_cache cache,
const char *type,
diff --git a/lib/blkid/cache.c b/lib/blkid/cache.c
index efd4656e..7c95726d 100644
--- a/lib/blkid/cache.c
+++ b/lib/blkid/cache.c
@@ -100,14 +100,14 @@ int blkid_get_cache(blkid_cache *ret_cache, const char *filename)
if (filename && !strlen(filename))
filename = 0;
- if (!filename)
+ if (!filename)
filename = safe_getenv("BLKID_FILE");
if (!filename)
filename = BLKID_CACHE_FILE;
cache->bic_filename = blkid_strdup(filename);
-
+
blkid_read_cache(cache);
-
+
*ret_cache = cache;
return 0;
}
@@ -120,7 +120,7 @@ void blkid_put_cache(blkid_cache cache)
(void) blkid_flush_cache(cache);
DBG(DEBUG_CACHE, printf("freeing cache struct\n"));
-
+
/* DBG(DEBUG_CACHE, blkid_debug_dump_cache(cache)); */
while (!list_empty(&cache->bic_devs)) {
@@ -137,7 +137,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",
@@ -148,7 +148,7 @@ void blkid_put_cache(blkid_cache cache)
}
if (cache->bic_filename)
free(cache->bic_filename);
-
+
free(cache);
}
@@ -165,12 +165,12 @@ void blkid_gc_cache(blkid_cache cache)
if (!p)
break;
if (stat(dev->bid_name, &st) < 0) {
- DBG(DEBUG_CACHE,
+ DBG(DEBUG_CACHE,
printf("freeing %s\n", dev->bid_name));
blkid_free_dev(dev);
cache->bic_flags |= BLKID_BIC_FL_CHANGED;
} else {
- DBG(DEBUG_CACHE,
+ DBG(DEBUG_CACHE,
printf("Device %s exists\n", dev->bid_name));
}
}
diff --git a/lib/blkid/dev.c b/lib/blkid/dev.c
index 5252a8eb..fb8d8527 100644
--- a/lib/blkid/dev.c
+++ b/lib/blkid/dev.c
@@ -77,7 +77,7 @@ void blkid_debug_dump_dev(blkid_dev dev)
list_for_each(p, &dev->bid_tags) {
blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags);
if (tag)
- printf(" tag: %s=\"%s\"\n", tag->bit_name,
+ printf(" tag: %s=\"%s\"\n", tag->bit_name,
tag->bit_val);
else
printf(" tag: NULL\n");
@@ -102,7 +102,7 @@ void blkid_debug_dump_dev(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;
@@ -131,7 +131,7 @@ extern int blkid_dev_set_search(blkid_dev_iterate iter,
{
char *new_type, *new_value;
- if (!iter || iter->magic != DEV_ITERATE_MAGIC || !search_type ||
+ if (!iter || iter->magic != DEV_ITERATE_MAGIC || !search_type ||
!search_value)
return -1;
new_type = malloc(strlen(search_type)+1);
@@ -168,8 +168,8 @@ extern int blkid_dev_next(blkid_dev_iterate iter,
while (iter->p != &iter->cache->bic_devs) {
dev = list_entry(iter->p, struct blkid_struct_dev, bid_devs);
iter->p = iter->p->next;
- if (iter->search_type &&
- !blkid_dev_has_tag(dev, iter->search_type,
+ if (iter->search_type &&
+ !blkid_dev_has_tag(dev, iter->search_type,
iter->search_value))
continue;
*ret_dev = dev;
@@ -220,7 +220,7 @@ int main(int argc, char **argv)
case 'm':
blkid_debug_mask = strtoul (optarg, &tmp, 0);
if (*tmp) {
- fprintf(stderr, "Invalid debug mask: %s\n",
+ fprintf(stderr, "Invalid debug mask: %s\n",
optarg);
exit(1);
}
diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c
index 2b3855b2..f0e127cf 100644
--- a/lib/blkid/devname.c
+++ b/lib/blkid/devname.c
@@ -58,7 +58,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;
@@ -79,7 +79,7 @@ blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, int flags)
dev = blkid_verify(cache, dev);
if (!dev || !(dev->bid_flags & BLKID_BID_FL_VERIFIED))
return dev;
- /*
+ /*
* If the device is verified, then search the blkid
* cache for any entries that match on the type, uuid,
* and label, and verify them; if a cache entry can
@@ -192,7 +192,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;
@@ -309,7 +309,7 @@ static void lvm_probe_all(blkid_cache cache, int only_if_new)
DBG(DEBUG_DEVNAME, printf("LVM dev %s: devno 0x%04X\n",
lvm_device,
(unsigned int) dev));
- probe_one(cache, lvm_device, dev, BLKID_PRI_LVM,
+ probe_one(cache, lvm_device, dev, BLKID_PRI_LVM,
only_if_new);
free(lvm_device);
}
@@ -417,7 +417,7 @@ static int probe_all(blkid_cache cache, int only_if_new)
ptname, (unsigned int) devs[which]));
if (sz > 1)
- probe_one(cache, ptname, devs[which], 0,
+ probe_one(cache, ptname, devs[which], 0,
only_if_new);
lens[which] = 0; /* mark as checked */
}
diff --git a/lib/blkid/devno.c b/lib/blkid/devno.c
index e9c174f4..0a16d9be 100644
--- a/lib/blkid/devno.c
+++ b/lib/blkid/devno.c
@@ -122,7 +122,7 @@ void blkid__scan_dir(char *dirname, dev_t devno, struct dir_list **list,
path, *devname));
break;
}
- if (list && S_ISDIR(st.st_mode) && !lstat(path, &st) &&
+ if (list && S_ISDIR(st.st_mode) && !lstat(path, &st) &&
S_ISDIR(st.st_mode))
add_to_dirlist(path, list);
}
@@ -175,13 +175,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%04llx as %s\n", (long long)devno, devname));
}
-
+
return devname;
}
diff --git a/lib/blkid/getsize.c b/lib/blkid/getsize.c
index 876d682c..10ba7ecf 100644
--- a/lib/blkid/getsize.c
+++ b/lib/blkid/getsize.c
@@ -199,7 +199,7 @@ int main(int argc, char **argv)
perror(argv[0]);
bytes = blkid_get_dev_size(fd);
- printf("Device %s has %Ld 1k blocks.\n", argv[1],
+ printf("Device %s has %Ld 1k blocks.\n", argv[1],
(unsigned long long) bytes >> 10);
return 0;
diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c
index 04eb29a7..10ac8036 100644
--- a/lib/blkid/probe.c
+++ b/lib/blkid/probe.c
@@ -47,7 +47,7 @@ static int figure_label_len(const unsigned char *label, int len)
return 0;
}
-static unsigned char *get_buffer(struct blkid_probe *pr,
+static unsigned char *get_buffer(struct blkid_probe *pr,
blkid_loff_t off, size_t len)
{
ssize_t ret_read;
@@ -96,7 +96,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;
@@ -139,7 +139,7 @@ static void get_ext2_info(blkid_dev dev, struct blkid_magic *id,
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)));
@@ -307,7 +307,7 @@ static int probe_ext4(struct blkid_probe *probe, struct blkid_magic *id,
es = (struct ext2_super_block *)buf;
/* Distinguish from jbd */
- if (blkid_le32(es->s_feature_incompat) &
+ if (blkid_le32(es->s_feature_incompat) &
EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
return -BLKID_ERR_PARAM;
@@ -419,13 +419,13 @@ static unsigned char *search_fat_label(struct vfat_dir_entry *dir, int count)
for (i = 0; i < count; i++) {
if (dir[i].name[0] == 0x00)
break;
-
+
if ((dir[i].name[0] == FAT_ENTRY_FREE) ||
(dir[i].cluster_high != 0 || dir[i].cluster_low != 0) ||
((dir[i].attr & FAT_ATTR_MASK) == FAT_ATTR_LONG_NAME))
continue;
- if ((dir[i].attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) ==
+ if ((dir[i].attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) ==
FAT_ATTR_VOLUME_ID) {
return dir[i].name;
}
@@ -436,7 +436,7 @@ static unsigned char *search_fat_label(struct vfat_dir_entry *dir, int count)
/* FAT label extraction from the root directory taken from Kay
* Sievers's volume_id library */
static int probe_fat(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct vfat_super_block *vs = (struct vfat_super_block *) buf;
@@ -484,11 +484,11 @@ static int probe_fat(struct blkid_probe *probe,
if (ms->ms_fat_length) {
/* the label may be an attribute in the root directory */
root_start = (reserved + fat_size) * sector_size;
- root_dir_entries = vs->vs_dir_entries[0] +
+ root_dir_entries = vs->vs_dir_entries[0] +
(vs->vs_dir_entries[1] << 8);
buf_size = root_dir_entries * sizeof(struct vfat_dir_entry);
- dir = (struct vfat_dir_entry *) get_buffer(probe, root_start,
+ dir = (struct vfat_dir_entry *) get_buffer(probe, root_start,
buf_size);
if (dir)
vol_label = search_fat_label(dir, root_dir_entries);
@@ -497,7 +497,7 @@ static int probe_fat(struct blkid_probe *probe,
vol_label = ms->ms_label;
vol_serno = ms->ms_serno;
- blkid_set_tag(probe->dev, "SEC_TYPE", "msdos",
+ blkid_set_tag(probe->dev, "SEC_TYPE", "msdos",
sizeof("msdos"));
} else {
/* Search the FAT32 root dir for the label attribute */
@@ -511,10 +511,10 @@ static int probe_fat(struct blkid_probe *probe,
int count;
next_sect_off = (next - 2) * vs->vs_cluster_size;
- next_off = (start_data_sect + next_sect_off) *
+ next_off = (start_data_sect + next_sect_off) *
sector_size;
- dir = (struct vfat_dir_entry *)
+ dir = (struct vfat_dir_entry *)
get_buffer(probe, next_off, buf_size);
if (dir == NULL)
break;
@@ -526,7 +526,7 @@ static int probe_fat(struct blkid_probe *probe,
break;
/* get FAT entry */
- fat_entry_off = (reserved * sector_size) +
+ fat_entry_off = (reserved * sector_size) +
(next * sizeof(__u32));
buf = get_buffer(probe, fat_entry_off, buf_size);
if (buf == NULL)
@@ -563,7 +563,7 @@ static int probe_fat(struct blkid_probe *probe,
* [7-Jul-2005, Karel Zak <kzak@redhat.com>]
*/
static int probe_fat_nomagic(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct msdos_super_block *ms;
@@ -574,7 +574,7 @@ static int probe_fat_nomagic(struct blkid_probe *probe,
if (ms->ms_heads == 0)
return 1;
- /* cluster size check*/
+ /* cluster size check*/
if (ms->ms_cluster_size == 0 ||
(ms->ms_cluster_size & (ms->ms_cluster_size-1)))
return 1;
@@ -604,7 +604,7 @@ static int probe_fat_nomagic(struct blkid_probe *probe,
}
static int probe_ntfs(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct ntfs_super_block *ns;
@@ -631,7 +631,7 @@ static int probe_ntfs(struct blkid_probe *probe,
if (ns->cluster_per_mft_record < 0)
mft_record_size = 1 << (0-ns->cluster_per_mft_record);
else
- mft_record_size = ns->cluster_per_mft_record *
+ mft_record_size = ns->cluster_per_mft_record *
sectors_per_cluster * bytes_per_sector;
nr_clusters = blkid_le64(ns->number_of_sectors) / sectors_per_cluster;
@@ -639,7 +639,7 @@ static int probe_ntfs(struct blkid_probe *probe,
(blkid_le64(ns->mft_mirror_cluster_location) > nr_clusters))
return 1;
- off = blkid_le64(ns->mft_mirror_cluster_location) *
+ off = blkid_le64(ns->mft_mirror_cluster_location) *
bytes_per_sector * sectors_per_cluster;
buf_mft = get_buffer(probe, off, mft_record_size);
@@ -649,7 +649,7 @@ static int probe_ntfs(struct blkid_probe *probe,
if (memcmp(buf_mft, "FILE", 4))
return 1;
- off = blkid_le64(ns->mft_cluster_location) * bytes_per_sector *
+ off = blkid_le64(ns->mft_cluster_location) * bytes_per_sector *
sectors_per_cluster;
buf_mft = get_buffer(probe, off, mft_record_size);
@@ -672,7 +672,7 @@ static int probe_ntfs(struct blkid_probe *probe,
attr_off = blkid_le16(mft->attrs_offset);
label_str[0] = 0;
-
+
while (1) {
attr = (struct file_attribute *) (buf_mft + attr_off);
attr_len = blkid_le16(attr->len);
@@ -712,7 +712,7 @@ static int probe_ntfs(struct blkid_probe *probe,
static int probe_xfs(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct xfs_super_block *xs;
@@ -756,7 +756,7 @@ static int probe_reiserfs(struct blkid_probe *probe,
}
static int probe_reiserfs4(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct reiser4_super_block *rs4 = (struct reiser4_super_block *) buf;
@@ -765,14 +765,14 @@ static int probe_reiserfs4(struct blkid_probe *probe,
if (strlen((char *) rs4->rs4_label))
label = rs4->rs4_label;
set_uuid(probe->dev, rs4->rs4_uuid, 0);
- blkid_set_tag(probe->dev, "LABEL", (const char *) label,
+ blkid_set_tag(probe->dev, "LABEL", (const char *) label,
sizeof(rs4->rs4_label));
return 0;
}
static int probe_jfs(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct jfs_super_block *js;
@@ -825,7 +825,7 @@ static int probe_luks(struct blkid_probe *probe,
}
static int probe_romfs(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct romfs_super_block *ros;
@@ -840,7 +840,7 @@ static int probe_romfs(struct blkid_probe *probe,
}
static int probe_cramfs(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct cramfs_super_block *csb;
@@ -888,7 +888,7 @@ static int probe_swap1(struct blkid_probe *probe,
/* 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(probe->dev, "LABEL", sws->sws_volume,
+ blkid_set_tag(probe->dev, "LABEL", sws->sws_volume,
sizeof(sws->sws_volume));
if (sws->sws_uuid[0])
set_uuid(probe->dev, sws->sws_uuid, 0);
@@ -897,7 +897,7 @@ static int probe_swap1(struct blkid_probe *probe,
}
static int probe_iso9660(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct iso_volume_descriptor *iso;
@@ -906,7 +906,7 @@ static int probe_iso9660(struct blkid_probe *probe,
iso = (struct iso_volume_descriptor *) buf;
label = iso->volume_id;
- blkid_set_tag(probe->dev, "LABEL", (const char *) label,
+ blkid_set_tag(probe->dev, "LABEL", (const char *) label,
figure_label_len(label, 32));
return 0;
}
@@ -917,7 +917,7 @@ static const char
"NSR03", "TEA01", 0 };
static int probe_udf(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf __BLKID_ATTR((unused)))
{
int j, bs;
@@ -927,7 +927,7 @@ static int probe_udf(struct blkid_probe *probe,
/* determine the block size by scanning in 2K increments
(block sizes larger than 2K will be null padded) */
for (bs = 1; bs < 16; bs++) {
- isosb = (struct iso_volume_descriptor *)
+ isosb = (struct iso_volume_descriptor *)
get_buffer(probe, bs*2048+32768, sizeof(isosb));
if (!isosb)
return 1;
@@ -938,8 +938,8 @@ static int probe_udf(struct blkid_probe *probe,
/* Scan up to another 64 blocks looking for additional VSD's */
for (j = 1; j < 64; j++) {
if (j > 1) {
- isosb = (struct iso_volume_descriptor *)
- get_buffer(probe, j*bs*2048+32768,
+ isosb = (struct iso_volume_descriptor *)
+ get_buffer(probe, j*bs*2048+32768,
sizeof(isosb));
if (!isosb)
return 1;
@@ -960,7 +960,7 @@ static int probe_udf(struct blkid_probe *probe,
}
static int probe_ocfs(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct ocfs_volume_header ovh;
@@ -975,7 +975,7 @@ static int probe_ocfs(struct blkid_probe *probe,
blkid_set_tag(probe->dev,"SEC_TYPE","ocfs1",sizeof("ocfs1"));
else if (major >= 9)
blkid_set_tag(probe->dev,"SEC_TYPE","ntocfs",sizeof("ntocfs"));
-
+
blkid_set_tag(probe->dev, "LABEL", ovl.label, ocfslabellen(ovl));
blkid_set_tag(probe->dev, "MOUNT", ovh.mount, ocfsmountlen(ovh));
set_uuid(probe->dev, ovl.vol_id, 0);
@@ -983,7 +983,7 @@ static int probe_ocfs(struct blkid_probe *probe,
}
static int probe_ocfs2(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct ocfs2_super_block *osb;
@@ -996,7 +996,7 @@ static int probe_ocfs2(struct blkid_probe *probe,
}
static int probe_oracleasm(struct blkid_probe *probe,
- struct blkid_magic *id __BLKID_ATTR((unused)),
+ struct blkid_magic *id __BLKID_ATTR((unused)),
unsigned char *buf)
{
struct oracle_asm_disk_label *dl;
@@ -1018,9 +1018,9 @@ static int probe_gfs(struct blkid_probe *probe,
if (blkid_be32(sbd->sb_fs_format) == GFS_FORMAT_FS &&
blkid_be32(sbd->sb_multihost_format) == GFS_FORMAT_MULTI)
- {
+ {
blkid_set_tag(probe->dev, "UUID", 0, 0);
-
+
if (strlen(sbd->sb_locktable))
label = sbd->sb_locktable;
blkid_set_tag(probe->dev, "LABEL", label, sizeof(sbd->sb_locktable));
@@ -1040,9 +1040,9 @@ static int probe_gfs2(struct blkid_probe *probe,
if (blkid_be32(sbd->sb_fs_format) == GFS2_FORMAT_FS &&
blkid_be32(sbd->sb_multihost_format) == GFS2_FORMAT_MULTI)
- {
+ {
blkid_set_tag(probe->dev, "UUID", 0, 0);
-
+
if (strlen(sbd->sb_locktable))
label = sbd->sb_locktable;
blkid_set_tag(probe->dev, "LABEL", label, sizeof(sbd->sb_locktable));
@@ -1051,7 +1051,7 @@ static int probe_gfs2(struct blkid_probe *probe,
return 1;
}
-static void unicode_16be_to_utf8(unsigned char *str, int out_len,
+static void unicode_16be_to_utf8(unsigned char *str, int out_len,
const unsigned char *buf, int in_len)
{
int i, j;
@@ -1138,7 +1138,7 @@ static int probe_hfsplus(struct blkid_probe *probe,
(memcmp(sbd->embed_sig, "HX", 2) != 0))
/* This must be an HFS volume, so fail */
return 1;
-
+
alloc_block_size = blkid_be32(sbd->al_blk_size);
alloc_first_block = blkid_be16(sbd->al_bl_st);
embed_first_block = blkid_be16(sbd->embed_startblock);
@@ -1431,7 +1431,7 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev)
if ((now >= dev->bid_time) &&
(st.st_mtime <= dev->bid_time) &&
- ((diff < BLKID_PROBE_MIN) ||
+ ((diff < BLKID_PROBE_MIN) ||
(dev->bid_flags & BLKID_BID_FL_VERIFIED &&
diff < BLKID_PROBE_INTERVAL)))
return dev;
@@ -1444,7 +1444,7 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev)
if ((probe.fd = open(dev->bid_name, O_RDONLY)) < 0) {
DBG(DEBUG_PROBE, printf("blkid_verify: error %s (%d) while "
- "opening %s\n", strerror(errno), errno,
+ "opening %s\n", strerror(errno), errno,
dev->bid_name));
goto open_err;
}
@@ -1454,12 +1454,12 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev)
probe.sbbuf = 0;
probe.buf = 0;
probe.buf_max = 0;
-
+
/*
* 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;
@@ -1530,7 +1530,7 @@ found_type:
free(probe.sbbuf);
if (probe.buf)
free(probe.buf);
- if (probe.fd >= 0)
+ if (probe.fd >= 0)
close(probe.fd);
return dev;
@@ -1574,7 +1574,7 @@ int main(int argc, char **argv)
printf("LABEL='%s'\n", dev->bid_label);
if (dev->bid_uuid)
printf("UUID='%s'\n", dev->bid_uuid);
-
+
blkid_free_dev(dev);
return (0);
}
diff --git a/lib/blkid/probe.h b/lib/blkid/probe.h
index 993156d1..bee5a518 100644
--- a/lib/blkid/probe.h
+++ b/lib/blkid/probe.h
@@ -30,7 +30,7 @@ struct blkid_probe {
size_t buf_max;
};
-typedef int (*blkid_probe_t)(struct blkid_probe *probe,
+typedef int (*blkid_probe_t)(struct blkid_probe *probe,
struct blkid_magic *id, unsigned char *buf);
struct blkid_magic {
@@ -347,7 +347,7 @@ struct ocfs_volume_header {
struct ocfs_volume_label {
unsigned char disk_lock[48];
- char label[64];
+ char label[64];
unsigned char label_len[2];
unsigned char vol_id[16];
unsigned char vol_id_len[2];
@@ -432,15 +432,15 @@ struct gfs2_sb {
__u32 sb_fs_format;
__u32 sb_multihost_format;
__u32 __pad0; /* Was superblock flags in gfs1 */
-
+
__u32 sb_bsize;
__u32 sb_bsize_shift;
__u32 __pad1; /* Was journal segment size in gfs1 */
-
+
struct gfs2_inum sb_master_dir; /* Was jindex dinode in gfs1 */
struct gfs2_inum __pad2; /* Was rindex dinode in gfs1 */
struct gfs2_inum sb_root_dir;
-
+
char sb_lockproto[GFS_LOCKNAME_LEN];
char sb_locktable[GFS_LOCKNAME_LEN];
/* In gfs1, quota and license dinodes followed */
@@ -686,7 +686,7 @@ _INLINE_ __u64 blkid_swab64(__u64 val)
return (blkid_swab32(val >> 32) |
(((__u64) blkid_swab32(val & 0xFFFFFFFFUL)) << 32));
}
-#endif
+#endif
diff --git a/lib/blkid/read.c b/lib/blkid/read.c
index b913b631..ca2798f0 100644
--- a/lib/blkid/read.c
+++ b/lib/blkid/read.c
@@ -315,7 +315,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);
@@ -401,7 +401,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));
@@ -463,7 +463,7 @@ static void debug_dump_dev(blkid_dev dev)
list_for_each(p, &dev->bid_tags) {
blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags);
if (tag)
- printf(" tag: %s=\"%s\"\n", tag->bit_name,
+ printf(" tag: %s=\"%s\"\n", tag->bit_name,
tag->bit_val);
else
printf(" tag: NULL\n");
diff --git a/lib/blkid/resolve.c b/lib/blkid/resolve.c
index b4a93081..678f34e7 100644
--- a/lib/blkid/resolve.c
+++ b/lib/blkid/resolve.c
@@ -68,7 +68,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;
@@ -126,7 +126,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/lib/blkid/save.c b/lib/blkid/save.c
index 60aa6ce7..656bb0bb 100644
--- a/lib/blkid/save.c
+++ b/lib/blkid/save.c
@@ -181,7 +181,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/lib/blkid/tag.c b/lib/blkid/tag.c
index 8a8ac990..b305ab48 100644
--- a/lib/blkid/tag.c
+++ b/lib/blkid/tag.c
@@ -83,7 +83,7 @@ blkid_tag blkid_find_tag_dev(blkid_dev dev, const char *type)
return NULL;
}
-extern int blkid_dev_has_tag(blkid_dev dev, const char *type,
+extern int blkid_dev_has_tag(blkid_dev dev, const char *type,
const char *value)
{
blkid_tag tag;
@@ -125,7 +125,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,
@@ -141,7 +141,7 @@ int blkid_set_tag(blkid_dev dev, const char *name,
if (!(val = blkid_strndup(value, vlength)) && value)
return -BLKID_ERR_MEM;
- /*
+ /*
* Certain common tags are linked directly to the device struct
* We need to know what they are before we do anything else because
* the function name parameter might get freed later on.
@@ -174,7 +174,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);
@@ -194,11 +194,11 @@ 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 (dev_var)
*dev_var = val;
-
+
if (dev->bid_cache)
dev->bid_cache->bic_flags |= BLKID_BIC_FL_CHANGED;
return 0;
@@ -274,7 +274,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;
@@ -301,7 +301,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 ||
@@ -342,9 +342,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;
@@ -352,7 +352,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) &&
@@ -395,7 +395,7 @@ extern int optind;
void usage(char *prog)
{
fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask] device "
- "[type value]\n",
+ "[type value]\n",
prog);
fprintf(stderr, "\tList all tags for a device and exit\n");
exit(1);
@@ -423,7 +423,7 @@ int main(int argc, char **argv)
case 'm':
blkid_debug_mask = strtoul (optarg, &tmp, 0);
if (*tmp) {
- fprintf(stderr, "Invalid debug mask: %s\n",
+ fprintf(stderr, "Invalid debug mask: %s\n",
optarg);
exit(1);
}
@@ -448,14 +448,14 @@ int main(int argc, char **argv)
dev = blkid_get_dev(cache, devname, flags);
if (!dev) {
- fprintf(stderr, "%s: Can not find device in blkid cache\n",
+ fprintf(stderr, "%s: Can not find device in blkid cache\n",
devname);
exit(1);
}
if (search_type) {
found = blkid_dev_has_tag(dev, search_type, search_value);
printf("Device %s: (%s, %s) %s\n", blkid_dev_devname(dev),
- search_type, search_value ? search_value : "NULL",
+ search_type, search_value ? search_value : "NULL",
found ? "FOUND" : "NOT FOUND");
return(!found);
}
diff --git a/lib/blkid/tst_types.c b/lib/blkid/tst_types.c
index 8e3055d9..3003c8b5 100644
--- a/lib/blkid/tst_types.c
+++ b/lib/blkid/tst_types.c
@@ -2,7 +2,7 @@
* This testing program makes sure the blkid_types header file
*
* Copyright (C) 2006 by Theodore Ts'o.
- *
+ *
* %Begin-Header%
* This file may be redistributed under the terms of the GNU Public
* License.