Re: [PATCH v2] btrfs-progs: fix segfault when listing column OTIME on big endian host

2013-08-01 Thread David Sterba
On Thu, Jul 25, 2013 at 10:12:01PM +0800, Eryu Guan wrote: The second btrfs command segfaults on big endian host(ppc64) btrfs subvolume snapshot /mnt/btrfs /mnt/btrfs/snap btrfs subvolume list -s /mnt/btrfs And ltrace shows localtime(0x10029c482d0) = 0

[PATCH v2] btrfs-progs: fix segfault when listing column OTIME on big endian host

2013-07-25 Thread Eryu Guan
The second btrfs command segfaults on big endian host(ppc64) btrfs subvolume snapshot /mnt/btrfs /mnt/btrfs/snap btrfs subvolume list -s /mnt/btrfs And ltrace shows localtime(0x10029c482d0) = 0 strftime( no return ... --- SIGSEGV

Re: [PATCH v2] btrfs-progs: fix segfault when listing column OTIME on big endian host

2013-07-25 Thread Zach Brown
btrfs-list.c: case BTRFS_LIST_OTIME: if (subv-otime) strftime(tstr, 256, %Y-%m-%d %X, localtime(subv-otime)); else strcpy(tstr, -); printf(%s, tstr);

Re: [PATCH v2] btrfs-progs: fix segfault when listing column OTIME on big endian host

2013-07-25 Thread Eryu Guan
On Fri, Jul 26, 2013 at 5:25 AM, Zach Brown z...@redhat.com wrote: btrfs-list.c: case BTRFS_LIST_OTIME: if (subv-otime) strftime(tstr, 256, %Y-%m-%d %X, localtime(subv-otime)); else