64-bit cleanups
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Wed, 3 Jun 2009 18:59:30 +0000 (18:59 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Wed, 3 Jun 2009 18:59:30 +0000 (18:59 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@891 d57e44dd-8a1f-0410-8b47-8ef2f437770f

usr/fileio/common.c
usr/fileio/fileio.c

index b1f5505..32f633b 100644 (file)
@@ -955,11 +955,11 @@ static void exec_inquiry(struct vdisk_cmd *vcmd)
                char dev_id_str[17];
 
                dev_id_num  = gen_dev_id_num(dev);
-               dev_id_len = snprintf(dev_id_str, sizeof(dev_id_str), "%llx",
+               dev_id_len = snprintf(dev_id_str, sizeof(dev_id_str), "%"PRIx64,
                                        dev_id_num);
                if (dev_id_len >= (signed)sizeof(dev_id_str))
                        dev_id_len = sizeof(dev_id_str) - 1;
-               TRACE_DBG("dev_id num %llx, str %s, len %d", dev_id_num,
+               TRACE_DBG("dev_id num %"PRIx64", str %s, len %d", dev_id_num,
                        dev_id_str, dev_id_len);
                if (0 == cmd->cdb[2]) { /* supported vital product data pages */
                        buf[3] = 3;
index 0949daa..2e2ab33 100644 (file)
@@ -295,7 +295,8 @@ int start(int argc, char **argv)
                        devs[i].file_name, (uint64_t)devs[i].file_size/1024/1024,
                        devs[i].block_size, (uint64_t)devs[i].nblocks);
 
-               snprintf(devs[i].usn, sizeof(devs[i].usn), "%llx", gen_dev_id_num(&devs[i]));
+               snprintf(devs[i].usn, sizeof(devs[i].usn), "%"PRIx64,
+                       gen_dev_id_num(&devs[i]));
                TRACE_DBG("usn %s", devs[i].usn);
 
                devs[i].scst_usr_fd = open(DEV_USER_PATH DEV_USER_NAME, O_RDWR |