]> granicus.if.org Git - strace/commitdiff
print_dev_t: print major and minor numbers in hex like stat(1)
authorShankara Pailoor <shankarapailoor@gmail.com>
Sun, 2 Dec 2018 19:57:10 +0000 (11:57 -0800)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 5 Dec 2018 16:10:05 +0000 (16:10 +0000)
* print_dev_t.c (print_dev_t): Print major and minor numbers in hex.
* strace.1.in: Update makedev example.
* tests/bpf-obj_get_info_by_fd.c (main): Update expected output.
* tests/btrfs.c (btrfs_print_balance_args, btrfs_test_scrub_ioctls,
btrfs_test_dev_info_ioctl, btrfs_test_get_dev_stats_ioctl,
btrfs_test_dev_replace_ioctl): Update expected output.
* tests/ioctl_dm.c (main): Likewise.
* tests/ioctl_loop.c (print_loop_info, print_loop_info64): Likewise.
* tests/mknod.c (main): Likewise.
* tests/mknodat.c (main): Likewise.
* tests/nlattr_unix_diag_msg.c (main): Likewise.
* tests/ustat.c (main): Likewise.
* tests/xstatx.c (print_stat): Likewise.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
print_dev_t.c
strace.1.in
tests/bpf-obj_get_info_by_fd.c
tests/btrfs.c
tests/ioctl_dm.c
tests/ioctl_loop.c
tests/mknod.c
tests/mknodat.c
tests/nlattr_unix_diag_msg.c
tests/ustat.c
tests/xstatx.c

index 9b62f842125c9d5fbaf568776a8dfa311dbea4e2..56476bc33ddee6bc8e0514db5ef27ebb07932ddf 100644 (file)
@@ -33,5 +33,5 @@
 void
 print_dev_t(const unsigned long long dev)
 {
-       tprintf("makedev(%u, %u)", major(dev), minor(dev));
+       tprintf("makedev(%#x, %#x)", major(dev), minor(dev));
 }
index 951431ab8dabbb3a2ff9507eacaf497ee8a7bf26..1285bcde12433af4d80a9766e1fc2ab041cfce55 100644 (file)
@@ -191,7 +191,7 @@ as appropriate.  In most cases, arguments are formatted in the most C-like
 fashion possible.
 For example, the essence of the command "ls \-l /dev/null" is captured as:
 .CW
-lstat("/dev/null", {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0
+lstat("/dev/null", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1, 0x3), ...}) = 0
 .CE
 Notice how the 'struct stat' argument is dereferenced and how each member is
 displayed symbolically.  In particular, observe how the
index 67b5122aa7d9c80f070ff5af37763b146d541341..833f703111f411a6950bedc1888e6059872de037 100644 (file)
@@ -333,7 +333,7 @@ main(void)
                printf(", ifindex=%u", map_info->ifindex);
        if (bpf_map_get_info_attr.info_len >
            offsetof(struct bpf_map_info_struct, netns_dev))
-               printf(", netns_dev=makedev(%u, %u)",
+               printf(", netns_dev=makedev(%#x, %#x)",
                       major(map_info->netns_dev), minor(map_info->netns_dev));
        if (bpf_map_get_info_attr.info_len >
            offsetof(struct bpf_map_info_struct, netns_ino))
@@ -478,7 +478,7 @@ main(void)
                        printf(", ifindex=%u", prog_info->ifindex);
                if (bpf_prog_get_info_attr.info_len >
                    offsetof(struct bpf_prog_info_struct, netns_dev))
-                       printf(", netns_dev=makedev(%u, %u)",
+                       printf(", netns_dev=makedev(%#x, %#x)",
                               major(prog_info->netns_dev),
                               minor(prog_info->netns_dev));
                if (bpf_prog_get_info_attr.info_len >
index f23d7c0a10a237ddf058918ac71f2e9b631bd4e0..5a60304ae01ceb7979bf378b953825a4017785cb 100644 (file)
@@ -556,7 +556,7 @@ btrfs_print_balance_args(struct btrfs_balance_args *args)
        prfl_btrfs(btrfs_space_info_flags, args->profiles,
                   "BTRFS_BLOCK_GROUP_???");
        print_uint64(", usage=", args->usage);
-       printf(", devid=makedev(%u, %u)",
+       printf(", devid=makedev(%#x, %#x)",
               major(args->devid), minor(args->devid));
        print_uint64(", pstart=", args->pstart);
        print_uint64(", pend=", args->pend);
@@ -1212,7 +1212,7 @@ btrfs_test_scrub_ioctls(void)
        ioctl(-1, BTRFS_IOC_SCRUB_CANCEL, NULL);
        printf("ioctl(-1, %s) = -1 EBADF (%m)\n", ioc(BTRFS_IOC_SCRUB_CANCEL));
 
-       printf("ioctl(-1, %s, {devid=makedev(%u, %u)",
+       printf("ioctl(-1, %s, {devid=makedev(%#x, %#x)",
               ioc(BTRFS_IOC_SCRUB), major(args.devid), minor(args.devid));
        print_uint64(", start=", args.start);
        print_uint64(", end=", args.end);
@@ -1226,7 +1226,7 @@ btrfs_test_scrub_ioctls(void)
               ioc(BTRFS_IOC_SCRUB_PROGRESS));
 
        ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, &args);
-       printf("ioctl(-1, %s, {devid=makedev(%u, %u)}) = -1 EBADF (%m)\n",
+       printf("ioctl(-1, %s, {devid=makedev(%#x, %#x)}) = -1 EBADF (%m)\n",
               ioc(BTRFS_IOC_SCRUB_PROGRESS),
               major(args.devid), minor(args.devid));
 }
@@ -1249,7 +1249,7 @@ btrfs_test_dev_info_ioctl(void)
 
        ioctl(-1, BTRFS_IOC_DEV_INFO, &args);
        printf("ioctl(-1, %s, "
-              "{devid=makedev(%u, %u), uuid=%s}) = -1 EBADF (%m)\n",
+              "{devid=makedev(%#x, %#x), uuid=%s}) = -1 EBADF (%m)\n",
               ioc(BTRFS_IOC_DEV_INFO), major(args.devid), minor(args.devid),
               uuid_reference_string);
 }
@@ -1703,7 +1703,7 @@ btrfs_test_get_dev_stats_ioctl(void)
        ioctl(-1, BTRFS_IOC_GET_DEV_STATS, NULL);
        printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", ioc(BTRFS_IOC_GET_DEV_STATS));
 
-       printf("ioctl(-1, %s, {devid=makedev(%u, %u)"
+       printf("ioctl(-1, %s, {devid=makedev(%#x, %#x)"
               ", nr_items=%" PRI__u64 ", flags=",
               ioc(BTRFS_IOC_GET_DEV_STATS),
               major(args.devid), minor(args.devid), args.nr_items);
@@ -1715,7 +1715,7 @@ btrfs_test_get_dev_stats_ioctl(void)
        if (write_ok) {
                unsigned int i;
                args.flags = BTRFS_DEV_STATS_RESET;
-               printf("ioctl(%d, %s, {devid=makedev(%u, %u)"
+               printf("ioctl(%d, %s, {devid=makedev(%#x, %#x)"
                        ", nr_items=%" PRI__u64 ", flags=",
                        btrfs_test_dir_fd, ioc(BTRFS_IOC_GET_DEV_STATS),
                        major(args.devid), minor(args.devid), args.nr_items);
@@ -1775,7 +1775,7 @@ btrfs_test_dev_replace_ioctl(void)
                saved_errno = errno;
                printf("ioctl(-1, %s, "
                       "{cmd=%sBTRFS_IOCTL_DEV_REPLACE_CMD_START%s"
-                      ", start={srcdevid=makedev(%u, %u)"
+                      ", start={srcdevid=makedev(%#x, %#x)"
                       ", cont_reading_from_srcdev_mode=",
                       ioc(BTRFS_IOC_DEV_REPLACE),
                       verbose_xlat ? "0 /* " : "", verbose_xlat ? " */" : "",
index 3792291eb5d9e80d1bf9b106d2ba1a501ee8517c..e65579aa73c9ff373fe75b1bc1d6eda3044f0ff8 100644 (file)
@@ -255,7 +255,7 @@ main(void)
        memcpy(dm_arg->uuid, str129, sizeof(dm_arg->uuid));
        ioctl(-1, DM_VERSION, dm_arg);
        printf("ioctl(-1, DM_VERSION, {version=4.1.2, data_size=%zu, "
-              "dev=makedev(18, 52), name=\"%.127s\"..., uuid=\"%.128s\"..., "
+              "dev=makedev(0x12, 0x34), name=\"%.127s\"..., uuid=\"%.128s\"..., "
               "flags=0}) = -1 EBADF (%m)\n",
               min_sizeof_dm_ioctl, str129, str129);
 
@@ -264,7 +264,7 @@ main(void)
        ioctl(-1, DM_VERSION, dm_arg);
        printf("ioctl(-1, DM_VERSION, "
               "{version=4.1.2, data_size=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", flags=0}) = "
               "-1 EBADF (%m)\n", min_sizeof_dm_ioctl);
 
        /* Zero dev, name, uuid */
@@ -284,7 +284,7 @@ main(void)
        ioctl(-1, DM_VERSION, dm_arg);
        printf("ioctl(-1, DM_VERSION, "
               "{version=4.1.2, data_size=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags="
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", flags="
               "DM_READONLY_FLAG|DM_SUSPEND_FLAG|DM_EXISTS_FLAG|"
               "DM_PERSISTENT_DEV_FLAG|DM_STATUS_TABLE_FLAG|"
               "DM_ACTIVE_PRESENT_FLAG|DM_INACTIVE_PRESENT_FLAG|"
@@ -300,7 +300,7 @@ main(void)
        ioctl(-1, DM_VERSION, &s);
        printf("ioctl(-1, DM_VERSION, "
               "{version=4.1.2, data_size=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", flags=0}) = "
               "-1 EBADF (%m)\n", sizeof(s.ioc));
 
 
@@ -330,7 +330,7 @@ main(void)
                init_s(dm_arg, min_sizeof_dm_ioctl, 0);
                ioctl(-1, dummy_check_cmds[i].arg, dm_arg);
                printf("ioctl(-1, %s, {version=4.1.2, data_size=%zu%s, "
-                      "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\"%s, "
+                      "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\"%s, "
                       "flags=0}) = -1 EBADF (%m)\n",
                       dummy_check_cmds[i].str, min_sizeof_dm_ioctl,
                       dummy_check_cmds[i].has_params ? ", data_start=0" : "",
@@ -345,14 +345,14 @@ main(void)
        ioctl(-1, DM_DEV_SUSPEND, &s);
        printf("ioctl(-1, DM_DEV_SUSPEND, "
               "{version=4.1.2, data_size=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", "
               "flags=DM_SUSPEND_FLAG}) = -1 EBADF (%m)\n", sizeof(s.ioc));
 
        init_s(&s.ioc, sizeof(s.ioc), 0);
        s.ioc.event_nr = 0xbadc0ded;
        ioctl(-1, DM_DEV_SUSPEND, &s);
        printf("ioctl(-1, DM_DEV_SUSPEND, "
-              "{version=4.1.2, data_size=%zu, dev=makedev(18, 52), "
+              "{version=4.1.2, data_size=%zu, dev=makedev(0x12, 0x34), "
               "name=\"nnn\", uuid=\"uuu\", event_nr=3134983661, "
               "flags=0}) = -1 EBADF (%m)\n", sizeof(s.ioc));
 
@@ -369,7 +369,7 @@ main(void)
        ioctl(-1, DM_TABLE_LOAD, &s);
        printf("ioctl(-1, DM_TABLE_LOAD, "
               "{version=4.1.2, data_size=%u, data_start=%u, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", "
               "target_count=1, flags=0, "
 # if VERBOSE
               "{sector_start=16, length=32, target_type=\"tgt\", "
@@ -386,7 +386,7 @@ main(void)
        ioctl(-1, DM_TABLE_LOAD, dm_arg);
        printf("ioctl(-1, DM_TABLE_LOAD, "
               "{version=4.1.2, data_size=%zu, data_start=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", "
               "target_count=0, flags=0}) = -1 EBADF (%m)\n",
               sizeof(*dm_arg), min_sizeof_dm_ioctl);
 
@@ -397,7 +397,7 @@ main(void)
        ioctl(-1, DM_TABLE_LOAD, dm_arg);
        printf("ioctl(-1, DM_TABLE_LOAD, "
               "{version=4.1.2, data_size=%zu, data_start=%u, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", "
               "target_count=1234, flags=0, "
 # if VERBOSE
               "??? /* misplaced struct dm_target_spec */"
@@ -414,7 +414,7 @@ main(void)
        ioctl(-1, DM_TABLE_LOAD, dm_arg_open1);
        printf("ioctl(-1, DM_TABLE_LOAD, "
               "{version=4.1.2, data_size=%zu, data_start=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", "
               "target_count=3735936673, flags=0, "
 # if VERBOSE
               "%p"
@@ -442,7 +442,7 @@ main(void)
        errstr = sprintrc(rc);
        printf("ioctl(-1, DM_TABLE_LOAD, "
               "{version=4.1.2, data_size=%zu, data_start=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", "
               "target_count=2, flags=0, ",
               sizeof(*dm_arg_open2),
               offsetof(struct dm_table_open_test, target1));
@@ -486,7 +486,7 @@ main(void)
        errstr = sprintrc(rc);
        printf("ioctl(-1, DM_TABLE_LOAD, "
               "{version=4.1.2, data_size=%zu, data_start=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", "
               "target_count=4, flags=0, ",
               offsetof(struct dm_table_open_test, target5),
               offsetof(struct dm_table_open_test, target0));
@@ -537,7 +537,7 @@ main(void)
        errstr = sprintrc(rc);
        printf("ioctl(-1, DM_TABLE_LOAD, "
               "{version=4.1.2, data_size=%zu, data_start=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", "
               "target_count=3134983661, flags=0, ",
               sizeof(*dm_arg_open3),
               offsetof(struct dm_table_open_test, target0));
@@ -563,7 +563,7 @@ main(void)
        ioctl(-1, DM_TARGET_MSG, &s);
        printf("ioctl(-1, DM_TARGET_MSG, "
               "{version=4.1.2, data_size=%u, data_start=%u, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", flags=0, "
 # if VERBOSE
               "{sector=4660, message=\"long targ\"...}"
 # else /* !VERBOSE */
@@ -578,7 +578,7 @@ main(void)
        ioctl(-1, DM_TARGET_MSG, dm_arg);
        printf("ioctl(-1, DM_TARGET_MSG, "
               "{version=4.1.2, data_size=%zu, data_start=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", flags=0, "
 # if VERBOSE
               "??? /* misplaced struct dm_target_msg */"
 # else /* !VERBOSE */
@@ -593,7 +593,7 @@ main(void)
        ioctl(-1, DM_TARGET_MSG, dm_arg);
        printf("ioctl(-1, DM_TARGET_MSG, "
               "{version=4.1.2, data_size=%zu, data_start=%u, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", flags=0, "
 # if VERBOSE
               "??? /* misplaced struct dm_target_msg */"
 # else /* !VERBOSE */
@@ -609,7 +609,7 @@ main(void)
        ioctl(-1, DM_TARGET_MSG, dm_arg);
        printf("ioctl(-1, DM_TARGET_MSG, "
               "{version=4.1.2, data_size=%zu, data_start=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", flags=0, "
 # if VERBOSE
               "%p"
 # else /* !VERBOSE */
@@ -632,7 +632,7 @@ main(void)
        errstr = sprintrc(rc);
        printf("ioctl(-1, DM_TARGET_MSG, "
               "{version=4.1.2, data_size=%zu, data_start=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, ",
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", flags=0, ",
               sizeof(*dm_arg_msg) + 1,
               offsetof(struct dm_target_msg_test, msg));
 # if VERBOSE
@@ -653,7 +653,7 @@ main(void)
        errstr = sprintrc(rc);
        printf("ioctl(-1, DM_TARGET_MSG, "
               "{version=4.1.2, data_size=%zu, data_start=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, ",
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", flags=0, ",
               sizeof(*dm_arg_msg), offsetof(struct dm_target_msg_test, msg));
 # if VERBOSE
        printf("{sector=%" PRI__u64 ", message=\"\"}",
@@ -670,7 +670,7 @@ main(void)
        ioctl(-1, DM_DEV_SET_GEOMETRY, &s);
        printf("ioctl(-1, DM_DEV_SET_GEOMETRY, "
               "{version=4.1.2, data_size=%u, data_start=%u, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", flags=0, "
 # if VERBOSE
               "string=\"10 20 30 \"..."
 # else /* !VERBOSE */
@@ -688,7 +688,7 @@ main(void)
        ioctl(-1, DM_DEV_RENAME, unaligned_dm_arg);
        printf("ioctl(-1, DM_DEV_RENAME, "
               "{version=4.1.2, data_size=%zu, data_start=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", event_nr=0, "
               "flags=0, "
 # if VERBOSE
               "string=%p"
@@ -708,7 +708,7 @@ main(void)
        ioctl(-1, DM_DEV_RENAME, &s);
        printf("ioctl(-1, DM_DEV_RENAME, "
               "{version=4.1.2, data_size=%u, data_start=3735928559, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", event_nr=0, "
               "flags=0, "
 # if VERBOSE
               "??? /* misplaced string */"
@@ -725,7 +725,7 @@ main(void)
        ioctl(-1, DM_DEV_RENAME, &s);
        printf("ioctl(-1, DM_DEV_RENAME, "
               "{version=4.1.2, data_size=%u, data_start=%zu, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", event_nr=0, "
               "flags=0, "
 # if VERBOSE
               "string=\"nn\""
@@ -742,7 +742,7 @@ main(void)
        ioctl(-1, DM_DEV_RENAME, &s);
        printf("ioctl(-1, DM_DEV_RENAME, "
               "{version=4.1.2, data_size=%u, data_start=%u, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", event_nr=0, "
               "flags=0, "
 # if VERBOSE
               "string=\"new long \"..."
@@ -759,7 +759,7 @@ main(void)
        ioctl(-1, DM_TABLE_LOAD, &s);
        printf("ioctl(-1, DM_TABLE_LOAD, "
               "{version=4.1.2, data_size=%u, data_start=%u, "
-              "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", "
+              "dev=makedev(0x12, 0x34), name=\"nnn\", uuid=\"uuu\", "
               "target_count=4294967295, flags=0, "
 # if VERBOSE
               "{sector_start=0, length=0, target_type=\"\", string=\"\"}"
index 06c99ae4eb98eab32e5e2864d929e1132f7cf272..dbd74f662a6cd273ef974dd39786fea89ef8e802 100644 (file)
@@ -63,8 +63,8 @@ print_loop_info(struct loop_info * const info, bool print_encrypt,
 #else
        printf("{lo_number=%d", info->lo_number);
 # if VERBOSE
-       printf(", lo_device=makedev(%u, %u), lo_inode=%lu, "
-              "lo_rdevice=makedev(%u, %u)",
+       printf(", lo_device=makedev(%#x, %#x), lo_inode=%lu, "
+              "lo_rdevice=makedev(%#x, %#x)",
               major(info->lo_device), minor(info->lo_device),
               info->lo_inode,
               major(info->lo_rdevice), minor(info->lo_rdevice));
@@ -119,8 +119,8 @@ print_loop_info64(struct loop_info64 * const info64, bool print_encrypt,
        printf("%p", info64);
 #else
 # if VERBOSE
-       printf("{lo_device=makedev(%u, %u), lo_inode=%" PRIu64
-              ", lo_rdevice=makedev(%u, %u), lo_offset=%#" PRIx64
+       printf("{lo_device=makedev(%#x, %#x), lo_inode=%" PRIu64
+              ", lo_rdevice=makedev(%#x, %#x), lo_offset=%#" PRIx64
               ", lo_sizelimit=%" PRIu64 ", lo_number=%" PRIu32,
               major(info64->lo_device), minor(info64->lo_device),
               (uint64_t) info64->lo_inode,
index 4bcc2744cc1597981241d91170c8249bc67e92dc..1d8591a0fadbf8e7ad47314034de80a98bc11447 100644 (file)
@@ -50,7 +50,7 @@ main(int ac, char **av)
        dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7);
 
        rc = call_mknod(S_IFCHR | 024, dev);
-       printf("mknod(\"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n",
+       printf("mknod(\"%s\", S_IFCHR|024, makedev(0x1, 0x7)) = %ld %s (%m)\n",
               sample, rc, errno2name());
 
        const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK;
@@ -58,7 +58,7 @@ main(int ac, char **av)
 
        rc = call_mknod(mode, dev);
        printf("mknod(\"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho"
-              ", makedev(%u, %u)) = %ld %s (%m)\n",
+              ", makedev(%#x, %#x)) = %ld %s (%m)\n",
               sample, (short) (mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX)),
               major((unsigned) dev), minor((unsigned) dev),
               rc, errno2name());
index 318dc5a6cde763469e687c13d82cb71e44c77afa..7ef576558e33d1d64b7a676a73dafd570563abd7 100644 (file)
@@ -50,7 +50,7 @@ main(void)
        dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7);
 
        rc = call_mknodat(S_IFCHR | 024, dev);
-       printf("mknodat(-1, \"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n",
+       printf("mknodat(-1, \"%s\", S_IFCHR|024, makedev(0x1, 0x7)) = %ld %s (%m)\n",
               sample, rc, errno2name());
 
        const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK;
@@ -58,7 +58,7 @@ main(void)
 
        rc = call_mknodat(mode, dev);
        printf("mknodat(-1, \"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho"
-              ", makedev(%u, %u)) = %ld %s (%m)\n",
+              ", makedev(%#x, %#x)) = %ld %s (%m)\n",
               sample, (short) (mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX)),
               major((unsigned) dev), minor((unsigned) dev),
               rc, errno2name());
index 180b8cd646c39b718e4459c0508a9061e3d7c246..ec1363e3919897bdb331a5eb3636929b64c5ab93 100644 (file)
@@ -96,7 +96,7 @@ main(void)
        TEST_NLATTR_OBJECT(fd, nlh0, hdrlen,
                           init_unix_diag_msg, print_unix_diag_msg,
                           UNIX_DIAG_VFS, pattern, uv,
-                          printf("{udiag_vfs_dev=makedev(%u, %u)",
+                          printf("{udiag_vfs_dev=makedev(%#x, %#x)",
                                  major(uv.udiag_vfs_dev),
                                  minor(uv.udiag_vfs_dev));
                           PRINT_FIELD_U(", ", uv, udiag_vfs_ino);
index 3341c70edbe86e96d415766016610d4e4e8d1db3..a8d7de79868eda7edd01e83ed78ec887db0e322e 100644 (file)
@@ -55,10 +55,10 @@ main(void)
        dev = (unsigned int) st.st_dev;
        rc = syscall(__NR_ustat, dev, ust);
        if (rc)
-               printf("ustat(makedev(%u, %u), %p) = %s\n",
+               printf("ustat(makedev(%#x, %#x), %p) = %s\n",
                       major(dev), minor(dev), ust, sprintrc(rc));
        else
-               printf("ustat(makedev(%u, %u)"
+               printf("ustat(makedev(%#x, %#x)"
                       ", {f_tfree=%llu, f_tinode=%llu}) = 0\n",
                       major(dev), minor(dev),
                       zero_extend_signed_to_ull(ust->f_tfree),
@@ -67,11 +67,11 @@ main(void)
 
        dev = (unsigned int) magic;
        rc = syscall(__NR_ustat, magic, 0);
-       printf("ustat(makedev(%u, %u), NULL) = %s\n",
+       printf("ustat(makedev(%#x, %#x), NULL) = %s\n",
               major(dev), minor(dev), sprintrc(rc));
 
        rc = syscall(__NR_ustat, magic, buf);
-       printf("ustat(makedev(%u, %u), %p) = %s\n",
+       printf("ustat(makedev(%#x, %#x), %p) = %s\n",
               major(dev), minor(dev), buf, sprintrc(rc));
 
        puts("+++ exited with 0 +++");
index 65fbad40c2367c85dd40cf1c3c70c32a1d9b229a..546b8024461d2d76662b5b778cc06d1d1aa52143 100644 (file)
@@ -147,7 +147,7 @@ print_perms(const unsigned int mode)
 static void
 print_stat(const STRUCT_STAT *st)
 {
-       printf("{st_dev=makedev(%u, %u)",
+       printf("{st_dev=makedev(%#x, %#x)",
               (unsigned int) major(zero_extend_signed_to_ull(st->st_dev)),
               (unsigned int) minor(zero_extend_signed_to_ull(st->st_dev)));
        printf(", st_ino=%llu", zero_extend_signed_to_ull(st->st_ino));
@@ -167,7 +167,7 @@ print_stat(const STRUCT_STAT *st)
 
        switch (st->st_mode & S_IFMT) {
        case S_IFCHR: case S_IFBLK:
-               printf(", st_rdev=makedev(%u, %u)",
+               printf(", st_rdev=makedev(%#x, %#x)",
                       (unsigned int) major(zero_extend_signed_to_ull(st->st_rdev)),
                       (unsigned int) minor(zero_extend_signed_to_ull(st->st_rdev)));
                break;