]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: rename label probing functions
authorPetr Uzel <petr.uzel@suse.cz>
Thu, 12 Jul 2012 09:47:19 +0000 (11:47 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Jul 2012 16:09:22 +0000 (18:09 +0200)
Rename check_$foo_label() to $foo_probe_label():

1/ 'probe' is more appropriate verb than 'check' for these functions
2/ making label name first part of the funciton name is IMO more
   friendly for tags completion (e.g. vim + cscope/ctags).

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
fdisks/fdiskaixlabel.c
fdisks/fdiskbsdlabel.c
fdisks/fdiskdoslabel.c
fdisks/fdiskmaclabel.c
fdisks/fdisksgilabel.c
fdisks/fdisksunlabel.c

index f908abcb8913b5cc88e01dd2f77949a1253ba58a..ebf9365e8b9deba0a79c4fc52111b96a980ec11f 100644 (file)
@@ -49,7 +49,7 @@ aix_nolabel(struct fdisk_context *cxt)
     return;
 }
 
-static int check_aix_label(struct fdisk_context *cxt)
+static int aix_probe_label(struct fdisk_context *cxt)
 {
     if (aixlabel->magic != AIX_LABEL_MAGIC &&
        aixlabel->magic != AIX_LABEL_MAGIC_SWAPPED) {
@@ -68,5 +68,5 @@ static int check_aix_label(struct fdisk_context *cxt)
 const struct fdisk_label aix_label =
 {
        .name = "aix",
-       .probe = check_aix_label
+       .probe = aix_probe_label,
 };
index 9ede3ef761514689efb8177a5a18ca70b5804f00..548a86d3bc513382ff678716e22dd989ac066354 100644 (file)
@@ -110,7 +110,7 @@ static struct xbsd_disklabel xbsd_dlabel;
  * so this does not mean that there is a BSD disk label.
  */
 static int
-check_osf_label(struct fdisk_context *cxt) {
+osf_probe_label(struct fdisk_context *cxt) {
        if (xbsd_readlabel (cxt, NULL, &xbsd_dlabel) == 0)
                return 0;
        return 1;
@@ -849,5 +849,5 @@ alpha_bootblock_checksum (char *boot)
 const struct fdisk_label bsd_label =
 {
        .name = "bsd",
-       .probe = check_osf_label
+       .probe = osf_probe_label,
 };
index 27536da38d325cf4e08debdbb9b9c03abbd0e154..a115e66157a21741485da7c5fbb7435e206fe193 100644 (file)
@@ -316,7 +316,7 @@ void dos_delete_partition(int i)
        }
 }
 
-static int check_dos_label(struct fdisk_context *cxt)
+static int dos_probe_label(struct fdisk_context *cxt)
 {
        int i;
 
@@ -684,5 +684,5 @@ void dos_write_table(struct fdisk_context *cxt)
 const struct fdisk_label dos_label =
 {
        .name = "dos",
-       .probe = check_dos_label,
+       .probe = dos_probe_label,
 };
index cbdf5926f8130540d3e548e648f6af9008ac0e2e..555245d88853fcc0ea10d2a99be48aba5b8c658f 100644 (file)
@@ -48,7 +48,7 @@ mac_nolabel(struct fdisk_context *cxt)
 }
 
 static int
-check_mac_label(struct fdisk_context *cxt)
+mac_probe_label(struct fdisk_context *cxt)
 {
        /*
        Conversion: only 16 bit should compared
@@ -83,5 +83,5 @@ IS_MAC:
 const struct fdisk_label mac_label =
 {
        .name = "mac",
-       .probe = check_mac_label
+       .probe = mac_probe_label,
 };
index c0b346ac0b84893df1f63b31f7bae86a4c33debf..071a84e7bd5825b2a42fc2d179f65592213f5931 100644 (file)
@@ -128,7 +128,7 @@ two_s_complement_32bit_sum(unsigned int *base, int size /* in bytes */) {
 }
 
 static int
-check_sgi_label(struct fdisk_context *cxt) {
+sgi_probe_label(struct fdisk_context *cxt) {
        if (sizeof(sgilabel) > 512) {
                fprintf(stderr,
                        _("According to MIPS Computer Systems, Inc the "
@@ -880,5 +880,5 @@ fill_sgiinfo(void)
 const struct fdisk_label sgi_label =
 {
        .name = "sgi",
-       .probe = check_sgi_label
+       .probe = sgi_probe_label,
 };
index d1f60541353b4b81ee1930a202bd8b2dfb7e0af9..909f159e4c539af29844d13836a0d42450c5a155 100644 (file)
@@ -78,7 +78,7 @@ static void init(void)
        partitions = SUN_NUM_PARTITIONS;
 }
 
-static int check_sun_label(struct fdisk_context *cxt)
+static int sun_probe_label(struct fdisk_context *cxt)
 {
        unsigned short *ush;
        int csum;
@@ -646,5 +646,5 @@ int sun_get_sysid(struct fdisk_context *cxt, int i)
 const struct fdisk_label sun_label =
 {
        .name = "sun",
-       .probe = check_sun_label,
+       .probe = sun_probe_label,
 };