aboutsummaryrefslogtreecommitdiffstats
path: root/utils.c
AgeCommit message (Expand)AuthorFilesLines
2016-01-14btrfs-progs: introduce helper for parsing args without optionsDavid Sterba1-0/+28
2016-01-13btrfs-progs: let test_isdir return the exact errorDavid Sterba1-8/+8
2016-01-12btrfs-progs: check for negative return value from ioctlDavid Sterba1-2/+2
2016-01-12btrfs-progs: remove unnecessary errno temp variablesDavid Sterba1-7/+3
2016-01-12btrfs-progs: use NULL instead of 0Byongho Lee1-2/+2
2016-01-04btrfs-progs: docs: mkfs, implications of DUP on devicesDavid Sterba1-1/+1
2015-11-26btrfs-progs: mkfs: allow --data DUP for single deviceZhao Lei1-6/+4
2015-11-19btrfs-progs: mkfs: use correct size for superblock csum and writeoutDavid Sterba1-4/+4
2015-11-16btrfs-progs: fix fd leak in resolve_loop_device_with_loopdevDavid Sterba1-5/+10
2015-11-16btrfs-progs: utils: do not expect lo_file_name to be null terminatedDavid Sterba1-1/+2
2015-11-16btrfs-progs: Fix partitioned loop devices resolvingFlorian Margaine1-1/+30
2015-11-16btrfs-progs: mkfs: handler memory allocation error in make_btrfsDavid Sterba1-3/+5
2015-11-06btrfs-progs: simplify empty stirngs checkDavid Sterba1-1/+1
2015-11-03btrfs-progs: mkfs: Round device size down to sectorsizeZhao Lei1-0/+2
2015-11-03btrfs-progs: Rename variables in btrfs_add_to_fsidZhao Lei1-5/+5
2015-11-02btrfs-progs: fix missing initialization of list head for dev_listAnand Jain1-0/+1
2015-11-02Btrfs-progs: Do not force mixed block group creation unless '-M' option is sp...Chandan Rajendra1-4/+1
2015-11-02btrfs-progs: move is_numerical() helper to utils and renameAnand Jain1-0/+11
2015-11-02btrfs-progs: use btrfs_open_dir in open_path_or_dev_mntZhao Lei1-10/+11
2015-10-02btrfs-progs: fix is_block_device() return checksAnand Jain1-3/+4
2015-10-02btrfs-progs: make sure that is_block_device will return only 0/1David Sterba1-1/+1
2015-10-02btrfs-progs: utils: Check nodesize against featuresQu Wenruo1-1/+7
2015-10-02btrfs-progs: provide fail safe for BTRFS_IOC_GET_FSLABEL ioctlAnand Jain1-9/+9
2015-09-14btrfs-progs: cleanup, update function definitions to be ANSI conformantDavid Sterba1-1/+1
2015-09-02btrfs-progs: handle errors in btrfs_wipe_existing_sbDavid Sterba1-11/+28
2015-08-31btrfs-progs: Introduce get_unit_mode_from_arg for common useZhao Lei1-0/+102
2015-08-31btrfs-progs: add memory allocation fail check in btrfs_add_to_fsid()Byongho Lee1-8/+12
2015-08-31btrfs-progs: Introduce btrfs_open_dir wrapperZhao Lei1-0/+56
2015-07-14btrfs-progs: utils: missing newline in error messages when checking dupDavid Sterba1-1/+1
2015-07-01btrfs-progs: drop unused parameter from make_btrfsDavid Sterba1-1/+1
2015-07-01btrfs-progs: move make_btrfs arguments to a structDavid Sterba1-77/+77
2015-06-12btrfs-progs: add helper for copying pathsDavid Sterba1-0/+19
2015-06-12btrfs-progs: properly set up ioctl argumentsDavid Sterba1-2/+2
2015-06-12btrfs-progs: use PATH_MAX instead of BTRFS_PATH_NAME_MAXDavid Sterba1-2/+2
2015-06-11btrfs-progs: use less memory for pretty_size_mode buffersDavid Sterba1-0/+18
2015-06-11btrfs-progs: print error within test_num_disk_vs_raidDavid Sterba1-10/+9
2015-06-11btrfs-progs: print error within test_dev_for_mkfsDavid Sterba1-13/+13
2015-06-09btrfs-progs: cleanup after errors in open_file_or_dir3David Sterba1-1/+3
2015-06-09btrfs-progs: fix argv0_buf handlingDavid Sterba1-0/+5
2015-06-08btrfs-progs: return the fsid from make_btrfs()Goffredo Baroncelli1-1/+6
2015-06-08btrfs-progs: add strdup in btrfs_add_to_fsid() to track the device pathGoffredo Baroncelli1-0/+1
2015-06-08btrfs-progs: mkfs: move info message out of btrfs_add_to_fsidDavid Sterba1-3/+0
2015-06-04btrfs-progs: add function to stringify filesystem featuresDavid Sterba1-0/+15
2015-06-02btrfs-progs: mkfs: check metadata redundancySam Tygier1-0/+18
2015-05-14btrfs-progs: btrfs_scan_block_devices is unused function delete itAnand Jain1-88/+0
2015-04-07btrfs-progs: print fs features filtered by a maskDavid Sterba1-2/+4
2015-04-07btrfs-progs: move feature parsing from mkfs to utilsDavid Sterba1-0/+88
2015-04-07btrfs-progs: mkfs, deprecate leafsize and clean up the codeDavid Sterba1-48/+48
2015-03-24btrfs-progs: Allow parse_qgroupid() to resolve subvolume path into qgroupidQu Wenruo1-4/+44
2015-03-24btrfs-progs: Move parse_qgroupid() to utils.cQu Wenruo1-0/+28
2015-03-23btrfs-progs: Fix msgs in check_node_or_leaf_sizeSebastian Thorarensen1-3/+3
2015-03-23btrfs-progs: mkfs: Move out some nodesize codeSebastian Thorarensen1-0/+21
2015-01-27btrfs-progs: don't output operational status information to stderrXing Gu1-1/+1
2015-01-27btrfs-progs: drop feature defines from C files, in favour of CFLAGS definesDimitri John Ledkov1-4/+0
2015-01-09btrfs-progs: Fix a buffer overflow causing segfault in fstests/btrfs/069Qu Wenruo1-0/+17
2015-01-09btrfs-progs: Allow debug-tree to be executed on regular file.Qu Wenruo1-4/+17
2015-01-03btrfs-progs: safely copy path in btrfs_scan_lblkidDavid Sterba1-1/+1
2015-01-03btrfs-progs: cleanup whitespace in is_same_blk_fileDavid Sterba1-11/+7
2015-01-03btrfs-progs: use strncpy in is_same_blk_fileDavid Sterba1-3/+3
2014-12-29btrfs-progs: move check_arg_type() to util.cGui Hecheng1-0/+33
2014-12-10btrfs-progs: basic support for TREE_SEARCH_V2 ioctlDavid Sterba1-0/+40
2014-12-04btrfs-progs: fix wrong num_devices for btrfs fi show with seed devicesGui Hecheng1-0/+76
2014-12-04btrfs-progs: remove BUG_ON on num of devices for btrfs fi showGui Hecheng1-1/+0
2014-12-04btrfs-progs: provide better error message for raid profile mismatchHidetoshi Seto1-6/+35
2014-12-04btrfs-progs: Add command btrfs filesystem disk-usageGoffredo Baroncelli1-0/+16
2014-12-04btrfs-progs: Enhance the command btrfs filesystem dfGoffredo Baroncelli1-0/+11
2014-12-04btrfs-progs: move group type and profile pretty printers to utilsDavid Sterba1-0/+44
2014-11-18btrfs-progs: use proper size for argv0 substitutionDavid Sterba1-1/+2
2014-11-04btrfs-progs: use the correct SI prefixesDavid Sterba1-1/+1
2014-11-03btrfs-progs: optimize btrfs_scan_lblkid() for multiple callsAnand Jain1-4/+10
2014-11-03btrfs-progs: introduce btrfs_register_all_device()Anand Jain1-0/+27
2014-11-03revert btrfs-progs: do a separate probe for _transient_ replacing deviceAnand Jain1-18/+1
2014-11-03btrfs-progs: code optimize cmd_scan_dev() use btrfs_register_one_device()Anand Jain1-3/+5
2014-10-17Btrfs-progs: check, ability to detect and fix outdated snapshot root itemsFilipe Manana1-0/+21
2014-10-16btrfs-progs: check sscanf return codeZach Brown1-1/+6
2014-10-16btrfs-progs: open RW to register device using btrfs-controlAnand Jain1-1/+1
2014-10-10btrfs-progs: add options to tune units for fi df outputDavid Sterba1-12/+40
2014-10-10btrfs-progs: Remove extra 'const' modifiers; they don't do anything.Adam Buchbinder1-3/+3
2014-10-10btrfs-progs: extend pretty printers with unit modeDavid Sterba1-22/+49
2014-10-10btrfs-progs: print B for bytesDavid Sterba1-1/+1
2014-10-10btrfs-progs: do a separate probe for transient replacing deviceAnand Jain1-1/+18
2014-10-10btrfs-progs: remove scan_for_btrfs()Anand Jain1-15/+0
2014-10-10btrfs-progs: remove BTRFS_SCAN_PROC scan methodAnand Jain1-4/+2
2014-10-10btrfs-progs: force overwrite should wipe stale SBAnand Jain1-0/+38
2014-10-10btrfs-progs: remove BTRFS_SCAN_DEV and btrfs_scan_one_dirEric Sandeen1-114/+0
2014-10-10btrfs-progs: don't fall back to recursive /dev scanEric Sandeen1-11/+1
2014-09-14btrfs-progs: fix find_mount_root() to handle duplicated mount point correctlyQu Wenruo1-2/+2
2014-09-02Btrfs-progs: fix typosHolger Hoffstätte1-1/+1
2014-08-22btrfs-progs: move test_isdir() to utils.cSatoru Takeuchi1-0/+19
2014-08-22btrfs-progs: introduce test_issubvolname() for simplicitySatoru Takeuchi1-0/+12
2014-08-22btrfs-progs: fix improper return value check for is_existing_blk_or_reg_fileGui Hecheng1-6/+13
2014-08-22Btrfs-progs: fix some build warnings on 32bit platformWang Shilong1-1/+1
2014-08-22btrfs-progs: Check fstype in find_mount_root()Qu Wenruo1-0/+11
2014-08-22btrfs-progs: Remove fprintf() in find_mount_root().Qu Wenruo1-5/+1
2014-08-22btrfs-progs: fix wrong message about forcing the mixed group profileAnand Jain1-3/+1
2014-08-22btrfs-progs: mkfs: don't zero extend small filesZach Brown1-38/+20
2014-08-22btrfs-progs: define BTRFS_MKFS_SMALL_VOLUME_SIZE for small volumeAnand Jain1-2/+2
2014-08-22btrfs-progs: Allow btrfs_read_dev_super() to read all 3 super for super_recover.Qu Wenruo1-5/+6
2014-08-22btrfs-progs: move the check_argc_* functions into utils.cGui Hecheng1-0/+46
2014-08-22btrfs-progs: Add minimum device size checkQu Wenruo1-0/+20
2014-08-22btrfs-progs: Improve the parse_size() error messageQu Wenruo1-16/+54
2014-08-22btrfs-progs: canonicalize pathnames for device commandsJeff Mahoney1-0/+58
2014-08-22btrfs-progs: mkfs: allow UUID specification at mkfs timeEric Sandeen1-3/+45
2014-05-02btrfs-progs: move arg_strtou64 to a separate file for libraryDavid Sterba1-33/+0
2014-05-02Btrfs-progs: mkfs: Remove 'zero_end =1' since it has been set to a valueLi Yang1-1/+0
2014-05-02Btrfs-progs: allow compression property gets for read-only subvolumesFilipe David Borba Manana1-2/+7
2014-05-02Btrfs-progs: fix check to test trim supportRakesh Pandit1-1/+1
2014-04-04btrfs-progs: make device discard process interruptibleDavid Sterba1-2/+24
2014-03-21btrfs-progs: Fix a memleak in btrfs_scan_lblkid().Qu Wenruo1-0/+1
2014-03-21btrfs-progs: Fix bug when scanned for devid which was missing and deletedAnand Jain1-2/+9
2014-03-21btrfs-progs: latest_devid is not always the probed devidAnand Jain1-2/+16
2014-03-21btrfs-progs: there is devid 0 when replace is runningAnand Jain1-1/+1
2014-03-21btrfs-progs: Allow use of get_device_info()Goffredo Baroncelli1-1/+1
2014-03-21btrfs-progs: fix wrong error msg for exec btrfsck as non-rootGui Hecheng1-1/+1
2014-03-21Btrfs-progs: new helper to parse string to u64 for btrfsWang Shilong1-0/+33
2014-03-21btrfs-progs: move find_mount_root to utils.[ch]Qu Wenruo1-0/+48
2014-03-21btrfs-progs: fix typo in reported errorAnand Jain1-2/+2
2014-01-31btrfs-progs: test_skip_this_disk() isn't needed anymoreAnand Jain1-17/+0
2014-01-31btrfs-progs: handle error in the btrfs_prepare_deviceAnand Jain1-11/+20
2014-01-31Btrfs-progs: make sure we are opening a file or dir with open_file_or_dir()Wang Shilong1-3/+10
2014-01-31btrfs-progs: Make btrfs_header_chunk_tree_uuid() return unsigned longRoss Kirk1-1/+1
2014-01-31Btrfs-progs: let get_label return the label instead of printing itFilipe David Borba Manana1-9/+6
2014-01-31btrfs-progs: make it static if function isn't called outsideAnand Jain1-1/+1
2014-01-31btrfs-progs: use /proc/self/mountsAnand Jain1-1/+1
2014-01-31btrfs-progs: fix loop device mount checksDavid Sterba1-15/+21
2013-11-07btrfs-progs: annotate fallthroughs in parse_sizeEric Sandeen1-0/+6
2013-11-07btrfs-progs: check btrfs_scan_one_device in btrfs_scan_lblkid()Eric Sandeen1-1/+8
2013-11-07btrfs-progs: Check for open failure in btrfs_scan_lblkid()Eric Sandeen1-1/+5
2013-11-07btrfs-progs: fix leak of "buf" in make_btrfs() error pathsEric Sandeen1-30/+32
2013-11-07btrfs-progs: don't leak fd in test_dev_for_mkfs() error pathsEric Sandeen1-0/+2
2013-11-07btrfs-progs: use strncpy in btrfs_scan_lblkid()Eric Sandeen1-1/+1
2013-11-07Btrfs-progs: rework open_ctree to take flags, add a new one V2Josef Bacik1-1/+1
2013-10-24Btrfs-progs: make pretty_sizes take u64 instead of a doubleJosef Bacik1-1/+1
2013-10-24btrfs-progs: filesystem show of specified mounted disk should workAnand Jain1-1/+26
2013-10-24btrfs-progs: make get_btrfs_mount callableAnand Jain1-4/+2
2013-10-16btrfs-progs: use the marco BTRFS_UPDATE_KERNEL where neededAnand Jain1-1/+1
2013-10-16Btrfs-progs: make pretty_size_snprintf() return lenWang Shilong1-4/+5
2013-10-16btrfs-progs: create helper function to use lblkid to scan for btrfs disksAnand Jain1-0/+55
2013-10-16btrfs-progs: Make btrfs_header_fsid() return unsigned longRoss Kirk1-2/+2
2013-10-16btrfs-progs: check if device supports trimDavid Sterba1-5/+8
2013-10-16btrfs-progs: look up the containing tree root idDavid Sterba1-0/+30
2013-10-16btrfs-progs: remove unused parameter from btrfs_header_fsidRoss Kirk1-1/+1
2013-10-16btrfs-progs: drop unused parameter from btrfs_item_nrRoss Kirk1-18/+18
2013-10-16Btrfs-progs: move ask_user() to utils.cWang Shilong1-0/+18
2013-10-16Btrfs-progs: do not run ioctls in check_mounted_where()Wang Shilong1-1/+1
2013-10-16btrfs-progs: add nodiscard option to device addDavid Sterba1-0/+2
2013-10-16btrfs-progs: use better name for nodiscard variable and flip the logicDavid Sterba1-2/+2
2013-10-16btrfs-progs: free the local list pending_list in btrfs_scan_one_dirGui Hecheng1-2/+8
2013-10-16btrfs-progs: mkfs should check for small vol well beforeAnand Jain1-0/+29
2013-10-16btrfs-progs: avoid write to the disk before sure to create fsAnand Jain1-0/+41
2013-09-03Btrfs-progs: mkfs can now create fs with skinny extentsFilipe David Borba Manana1-7/+19
2013-09-03btrfs-progs: remove __CHECKER__ from main codeZach Brown1-7/+0
2013-09-03btrfs-progs: mark static & remove unused from non-kernel codeEric Sandeen1-9/+11
2013-09-03Btrfs-progs: fix a regression in mkfs.btrfsStefan Behrens1-1/+1
2013-09-03btrfs-progs: cmd_start_replace() to use test_dev_for_mkfs()Anand Jain1-0/+10
2013-09-03btrfs-progs: drop unused parameter from btrfs_release_pathEric Sandeen1-1/+1
2013-09-03btrfs-progs: don't have to report ENOMEDIUM error during openAnand Jain1-2/+3
2013-08-09btrfs-progs: get_label_mounted to return label instead of printAnand Jain1-5/+13
2013-08-09btrfs-progs: congregate dev scanAnand Jain1-2/+20
2013-08-09btrfs-progs: btrfs_scan_for_fsid doesn't need all the argumentsAnand Jain1-3/+2
2013-08-09Btrfs-progs: fix closing of opendir()Wang Shilong1-14/+21
2013-08-09btrfs-progs: use IEC units for sizesDavid Sterba1-2/+1
2013-08-09Btrfs-progs: return error on write failure in make_btrfs()Filipe David Borba Manana1-8/+28
2013-08-09Btrfs-progs: add missing write check for mkfsFilipe David Borba Manana1-0/+2
2013-08-09btrfs-progs: per-thread, per-call pretty bufferZach Brown1-9/+10
2013-08-09btrfs-progs: Cleanup for using BTRFS_SETGET_STACK instead of raw convertQu Wenruo1-2/+2
2013-05-02btrfs-progs: mkfs seg fault for wrong freeAnand Jain1-1/+1
2013-04-23btrfs-progs: mkfs should first check all disks before writing to a diskAnand Jain1-0/+128
2013-04-23btrfs-progs: delete unused function get_mountptAnand Jain1-35/+0
2013-04-09Btrfs-progs: make btrfs-image restore with a valid chunk tree V2Josef Bacik1-2/+2
2013-03-14btrfs-progs: print errno string when /dev/btrfs-control open failsAnand Jain1-1/+2
2013-03-12btrfs-progs: rework get_fs_info to remove side effectsEric Sandeen1-19/+56
2013-03-12btrfs-progs: three new device/path helpersEric Sandeen1-0/+87
2013-03-12btrfs-progs: close fd on return from label get/set functionsEric Sandeen1-0/+2
2013-03-10btrfs-progs: separate super_copy out of fs_infoDavid Sterba1-5/+5
2013-03-10btrfs-progs: check for null string in parse_sizeEric Sandeen1-1/+1
2013-03-03btrfs-progs: from troubleshooting point of view messages must be uniqueAnand Jain1-1/+1
2013-02-27Btrfs-progs: add correct indentationAnand Jain1-6/+7
2013-02-26btrfs-progs: move btrfslabel.[c|h] stuff to utils.[c|h]Jeff Liu1-0/+130
2013-02-26btrfs-progs: refactor check_label()Jeff Liu1-10/+4
2013-02-19Btrfs-progs: check out if the swap deviceTsutomu Itoh1-0/+75
2013-02-06Btrfs-progs print more informative error when we fail to open a deviceEric Sandeen1-1/+2
2013-02-05btrfs-progs: simplify ioctl name copy and null terminationEric Sandeen1-0/+20
2013-02-05btrfs-progs: fix overflow in btrfs_scan_one_dir()Zach Brown1-6/+4
2013-02-05btrfs-progs: array indexes must be < ARRAY_SIZE()Zach Brown1-1/+1
2013-02-05btrfs-progs: treat super.magic as an le64Zach Brown1-3/+2
2013-01-30Btrfs-progs: make two utility functions globally availableStefan Behrens1-0/+67
2013-01-30Btrfs-progs: move open_file_or_dir() to utils.cAnand Jain1-2/+28
2013-01-21Btrfs-progs: fix resolving of loop devicesNirbheek Chauhan1-12/+14
2013-01-18Ignore the error ENXIO and ENOMEDIUM during a devs scanGoffredo Baroncelli1-2/+8
2013-01-17btrfs-progs: plug memory leaks in btrfs_scan_one_dir() reported by cppcheck.Kenji Okimoto1-0/+3
2013-01-17parse_size(): add new suffixesGoffredo Baroncelli1-0/+6
2013-01-17parse_size(): replace atoll() with strtoull()Goffredo Baroncelli1-6/+19
2013-01-17Move parse_size() to utils.[hc]Goffredo Baroncelli1-0/+26
2012-10-04pretty_sizes() returns incorrect valuesGoffredo Baroncelli1-14/+16
2012-10-02Btrfs-progs: only enforce a maximum size if we specify oneJosef Bacik1-9/+3
2012-10-02btrfs-progs: mkfs: create root directory with 755 permissionsDavid Sterba1-1/+1
2012-07-06btrfs-progs: mkfs: add option to skip trimDavid Sterba1-5/+13
2012-07-03btrfs-progs: enforce block count on all devices in mkfsJosef Bacik1-0/+2
2012-06-05avoid several strncpy-induced buffer overrunsJim Meyering1-3/+10