* [PATCH] btrfs-progs: use accessor macro for otime
@ 2013-07-09 16:38 David Sterba
0 siblings, 0 replies; only message in thread
From: David Sterba @ 2013-07-09 16:38 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
The root_item->otime value must be accessed via the macro otherwise the
value is incorrect on big endian machines.
Signed-off-by: David Sterba <dsterba@suse.cz>
---
btrfs-list.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/btrfs-list.c b/btrfs-list.c
index c3d35de..7f34237 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -1059,7 +1059,7 @@ static int __list_subvol_search(int fd, struct root_lookup *root_lookup)
flags = btrfs_root_flags(ri);
if(sh.len >
sizeof(struct btrfs_root_item_v0)) {
- t = ri->otime.sec;
+ t = btrfs_stack_timespec_sec(&ri->otime);
ogen = btrfs_root_otransid(ri);
memcpy(uuid, ri->uuid, BTRFS_UUID_SIZE);
memcpy(puuid, ri->parent_uuid, BTRFS_UUID_SIZE);
--
1.8.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-09 16:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-09 16:38 [PATCH] btrfs-progs: use accessor macro for otime David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).