summaryrefslogtreecommitdiff
path: root/btrfs-crc.c
Commit message (Collapse)AuthorAge
* btrfs-progs: btrfs-crc: make argc check more strictSatoru Takeuchi2016-06-03
| | | | | Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: btrfs-crc: improve usage messageSatoru Takeuchi2016-06-03
| | | | | | | | - If -c is set, filename argument is ignored. - Describe about -h option Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: btrfs-crc: print usage on receiving invalid argumentsSatoru Takeuchi2016-06-03
| | | | | | | | Usage is only printed if -h option is set. However it's nice to do it when wrong option is set or the number of argument is wrong. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: btrfs-crc: fix build errorSatoru Takeuchi2016-06-03
| | | | | | | | | | | | | | | | | | | Remove the following build error. ==================================== $ make btrfs-crc [CC] btrfs-crc.o [LD] btrfs-crc btrfs-crc.o: In function `usage': /home/sat/src/btrfs-progs/btrfs-crc.c:26: multiple definition of `usage' help.o:/home/sat/src/btrfs-progs/help.c:125: first defined here collect2: error: ld returned 1 exit status Makefile:294: recipe for target 'btrfs-crc' failed make: *** [btrfs-crc] Error 1 ===================================== Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Use new random number APIQu Wenruo2016-06-03
| | | | | | | | | | | | | Replace old and not so informal srand()/rand() calls to new random number API. Including btrfs-corrupt-block(main user), btrfs-image and btrfs-crc. Some tests like dir-test/random-test/quick-test is not modified. As random-test itself can't even pass build. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: use check_argc_* to check arg number for all toolsGui Hecheng2014-08-22
| | | | | | | | | | | | Since this patch: btrfs-progs: move the check_argc_* functions into utils.c All tools including the independent tools(e.g. btrfs-image, btrfs-convert) can share the convenience of the check_argc_* functions, so this patch adopt the argc check functions globally. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Fix getopt on arm/ppc platformsDavid Sterba2013-08-09
| | | | | | | | | (same as commit bb0eabc383e9a3fde7cdb02591ca88243f3e31fb) There, 'char' is unsigned, so once assigned '-1' from getopt, it gets the value 255. Then, it compared to '-1' gives false. Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
* Btrfs-progs: btrfs-crc: support specifying checksum in hexStefan Behrens2013-04-23
| | | | Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
* Btrfs-progs: add btrfs-crc toolJan Schmidt2013-04-09
This tool can be used to compute btrfs' style crc32c checksums for filenames as done by the kernel. Additionally, there is -c mode to do a brute force search for file names with a given checksum. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>