Skip to contentSkip to conversation

virtio-9p-proxy: Fix typo causing compile failure on 32 bit hosts

PATCH Applied Peter Maydell 2 participants 2 messages Jan 6, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio-9p-proxy: Fix typo causing compile failure on 32 bit hosts

Fix a compile failure on 32 bit hosts (integer constant is too large for 'unsigned long' type) by correcting a typo where the mask used for filling in the second f_fsid word had too many 'F's in it. Also drop the 'L' suffix that allowed this typo to go undetected on 64 bit hosts.

---
This was introduced in commit b178adc3e.

 hw/9pfs/virtio-9p-proxy.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
hw/9pfs/virtio-9p-proxy.c +2 -2
index 44f5fc4..d5ad208 100644
@@ -112,8 +112,8 @@ static void prstatfs_to_statfs(struct statfs *stfs, ProxyStatFS *prstfs)
     stfs->f_bavail = prstfs->f_bavail;
     stfs->f_files = prstfs->f_files;
     stfs->f_ffree = prstfs->f_ffree;
-    stfs->f_fsid.__val[0] = prstfs->f_fsid[0] & 0xFFFFFFFFUL;
-    stfs->f_fsid.__val[1] = prstfs->f_fsid[1] >> 32 & 0xFFFFFFFFFUL;
+    stfs->f_fsid.__val[0] = prstfs->f_fsid[0] & 0xFFFFFFFFU;
+    stfs->f_fsid.__val[1] = prstfs->f_fsid[1] >> 32 & 0xFFFFFFFFU;
     stfs->f_namelen = prstfs->f_namelen;
     stfs->f_frsize = prstfs->f_frsize;
 }
Signature · 1 line
1.7.1
#1 lore raw
Quoted 7 lines · Peter Maydell

Fix a compile failure on 32 bit hosts (integer constant is too large for 'unsigned long' type) by correcting a typo where the mask used for filling in the second f_fsid word had too many 'F's in it. Also drop the 'L' suffix that allowed this typo to go undetected on 64 bit hosts.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 21 lines

---
This was introduced in commit b178adc3e.

  hw/9pfs/virtio-9p-proxy.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
hw/9pfs/virtio-9p-proxy.c +2 -2
index 44f5fc4..d5ad208 100644
@@ -112,8 +112,8 @@ static void prstatfs_to_statfs(struct statfs *stfs, ProxyStatFS *prstfs)
      stfs->f_bavail = prstfs->f_bavail;
      stfs->f_files = prstfs->f_files;
      stfs->f_ffree = prstfs->f_ffree;
-    stfs->f_fsid.__val[0] = prstfs->f_fsid[0]&  0xFFFFFFFFUL;
-    stfs->f_fsid.__val[1] = prstfs->f_fsid[1]>>  32&  0xFFFFFFFFFUL;
+    stfs->f_fsid.__val[0] = prstfs->f_fsid[0]&  0xFFFFFFFFU;
+    stfs->f_fsid.__val[1] = prstfs->f_fsid[1]>>  32&  0xFFFFFFFFU;
      stfs->f_namelen = prstfs->f_namelen;
      stfs->f_frsize = prstfs->f_frsize;
  }