summaryrefslogtreecommitdiff
path: root/btrfs-show-super.c
Commit message (Collapse)AuthorAge
* btrfs-progs: remove variable length stack arraysZach Brown2013-09-03
| | | | | | | | | | | | | sparse hates variable length array definitions on the stack: btrfs-show-super.c:155:21: warning: Variable length array is used. And it's right to. They're a fragile construct that doesn't handle bad input well at all. Signed-off-by: Zach Brown <zab@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
* btrfs-progs: Cleanup for using BTRFS_SETGET_STACK instead of raw convertQu Wenruo2013-08-09
| | | | | | | | | | | | Some codes still use the cpu_to_lexx instead of the BTRFS_SETGET_STACK_FUNCS declared in ctree.h. Also added some BTRFS_SETGET_STACK_FUNCS for btrfs_header and btrfs_super. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
* Btrfs-progs: add uuid_tree_gen field to btrfs-show-superStefan Behrens2013-08-09
| | | | | | Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
* btrfs-progs: don't call close on error fdEric Sandeen2013-02-27
| | | | | | | In the error case where fd < 0, close(fd) is the wrong thing to do. Signed-off-by: Eric Sandeen <sandeen@redhat.com>
* btrfs-progs: treat super.magic as an le64Zach Brown2013-02-05
| | | | | | | | | | | | The super block magic is a le64 whose value looks like an unterminated string in memory. The lack of null termination leads to clumsy use of string functions and causes static analysis tools to warn that the string will be unterminated. So let's just treat it as the le64 that it is. Endian wrappers are used on the constant so that they're compiled into run-time constants. Signed-off-by: Zach Brown <zab@redhat.com>
* btrfs-progs: Add btrfs-show-superStefan Behrens2013-01-23
Just a small program to print the fields of a super block. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>