]> err.no Git - util-linux/commitdiff
libblkid: cosmetic change in topology sample
authorKarel Zak <kzak@redhat.com>
Fri, 18 Sep 2009 11:21:19 +0000 (13:21 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 18 Sep 2009 11:21:19 +0000 (13:21 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/samples/topology.c

index 7e5b489d3625ed3614b54305452761e6fc0e22c6..665281cdd14e397a07aeecd99271682592ddd6c7 100644 (file)
@@ -47,6 +47,20 @@ int main(int argc, char *argv[])
        if (blkid_probe_set_device(pr, fd, 0, 0) != 0)
                err(EXIT_FAILURE, "failed to assign device to libblkid probe");
 
+       /*
+        * Binary interface
+        */
+       tp = blkid_probe_get_topology(pr);
+       if (tp) {
+               printf("----- binary interface:\n");
+               printf("\talignment offset : %lu\n",
+                               blkid_topology_get_alignment_offset(tp));
+               printf("\tminimum io size  : %lu\n",
+                               blkid_topology_get_minimum_io_size(tp));
+               printf("\toptimal io size  : %lu\n",
+                               blkid_topology_get_optimal_io_size(tp));
+       }
+
        /*
         * NAME=value interface
         */
@@ -75,19 +89,6 @@ int main(int argc, char *argv[])
                }
        }
 
-       /*
-        * Binary interface
-        */
-       tp = blkid_probe_get_topology(pr);
-       if (tp) {
-               printf("----- binary interface:\n");
-               printf("alignment offset : %lu\n",
-                               blkid_topology_get_alignment_offset(tp));
-               printf("minimum io size  : %lu\n",
-                               blkid_topology_get_minimum_io_size(tp));
-               printf("optimal io size  : %lu\n",
-                               blkid_topology_get_optimal_io_size(tp));
-       }
 
        return EXIT_SUCCESS;
 }