summaryrefslogtreecommitdiffstats
path: root/daemon/lvm.c
Commit message (Collapse)AuthorAgeFilesLines
* avoid use of all ctype macrosJim Meyering2009-09-241-3/+3
| | | | | | | | | | | | | | | | | | | | * cfg.mk (disable_temporarily): Don't disable sc_avoid_ctype_macros. * fish/tilde.c: Remove unnecessary inclusion of ctype.h. * bootstrap: Add gnulib's c-ctype module to the list. * daemon/m4/gnulib-cache.m4: Likewise. * daemon/ext2.c: Include "c-ctype.h", not <ctype.h>. Use c_isspace, etc, rather than isspace. * daemon/guestfsd.c: Likewise. * daemon/lvm.c: Likewise. * daemon/proto.c: Likewise. * fish/fish.c: Likewise. * fish/tilde.c: Likewise. * src/generator.ml: Likewise. * src/guestfs.c: Likewise. * examples/to-xml.c: Likewise. * examples/Makefile.am (to_xml_CPPFLAGS): Add -I$(top_srcdir)/gnulib/lib so inclusion of "c-ctype.h" works. (to_xml_CPPFLAGS): Rename from to_xml_CFLAGS.
* adjust const "**" pointers to avoid warningsJim Meyering2009-08-171-8/+4
| | | | | | Also, ... * src/generator.ml: Add DeviceList type, and propagate that change out to all calling/interface code.
* generator.ml: use new "Pathname" designationJim Meyering2009-08-131-11/+9
| | | | | | | | | | Nearly every file-related function in daemons/*.c is affected: Remove this pair of statements from each affected do_* function: - NEED_ROOT (return -1); - ABS_PATH (dir, return -1); and change the type of the corresponding parameter to "const char *". * src/generator.ml: Emit NEED_ROOT just once, even when there are two or more Pathname args.
* * src/generator.ml: Change all `String "device"' to `Device "device"'.Jim Meyering2009-08-131-8/+0
| | | | | | | | | | | | | | | | | | | | | Then update each affected function, removing each uses of RESOLVE_DEVICE, now that it's generated in caller from stub.c. * daemon/blockdev.c (call_blockdev): Remove use of RESOLVE_DEVICE. * daemon/devsparts.c (do_mkfs): Likewise. * daemon/ext2.c (do_e2fsck_f, do_get_e2label, do_get_e2uuid): Likewise. (do_resize2fs, do_set_e2label, do_set_e2uuid, do_tune2fs_l): Likewise. * daemon/fsck.c (do_fsck): Likewise. * daemon/grub.c (do_grub_install): Likewise. * daemon/lvm.c (do_lvremove, do_pvcreate, do_pvremove): Likewise. (do_pvresize): Likewise. * daemon/mount.c (do_mount_vfs): Likewise. * daemon/ntfs.c (do_ntfs_3g_probe): Likewise. * daemon/scrub.c (do_scrub_device): Likewise. * daemon/sfdisk.c (sfdisk, sfdisk_flag): Likewise. * daemon/swap.c (do_mkswap, do_mkswap_L, do_mkswap_U): Likewise. (do_swapoff_device, do_swapon_device): Likewise. * daemon/zero.c (do_zero): Likewise. * daemon/zerofree.c (do_zerofree): Likewise.
* change almost all uses: s/IS_DEVICE/RESOLVE_DEVICE/Jim Meyering2009-08-131-6/+6
| | | | | | Use this command: git grep -l -w IS_DEVICE|xargs perl -pi -e \ 's/\b(?:IS_DEVICE)\b( \(.*?,) (.*?)\)/RESOLVE_DEVICE$1 return $2)/'
* Convert all TABs-as-indentation to spaces.Jim Meyering2009-08-031-14/+14
| | | | | | | | | | | Do it by running this command: [exempted files are matched via .x-sc_TAB_in_indentation] git ls-files \ | pcregrep -vf .x-sc_TAB_in_indentation \ | xargs pcregrep -l '^ *\t' \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
* Generate structs and struct lists generically.Richard Jones2009-07-071-3/+3
| | | | | | | | | | | This modifies the way that struct and struct lists are generated (for return values) so that there is no need to add an explicit new type when adding a new structure. All tests pass, and the C API should be compatible. I have also inspected the changes that are made to the generated code by hand.
* remove trailing blanksJim Meyering2009-07-031-1/+1
|
* Call 'udevadm settle' after operations which add/remove device nodes.Richard W.M. Jones2009-07-011-0/+23
| | | | | | | | | | | | | Because udev operates asynchronously, we found errors which were caused by a previous command (eg. sfdisk or pvremove) creating or removing a device, and that change not having happened by the time the next command was run. This patch adds calls to '/sbin/udevadm settle' after any commands which can add or remove device nodes. If udev is not being used or not available, this should have no effect. The command fails and this is silently ignored.
* In the daemon, change all const char * parameters to char *.Richard Jones2009-06-101-12/+12
|
* Add IS_DEVICE checks for all calls which take a device parameter.Richard Jones2009-06-101-0/+12
|
* Add: lvresize, resize2fs commands.Richard Jones2009-05-181-0/+24
|
* Add vg-activate{,-all} commands, and resize recipe.Richard Jones2009-05-181-0/+39
|
* Add: pvresize, sfdisk-N, sfdisk-l, sfdisk-kernel-geomtry, ↵Richard W.M. Jones2009-05-151-0/+18
| | | | sfdisk-disk-geometry commands. Pass --no-reread flag to sfdisk.
* Fix unchecked malloc (Jim Meyering).Richard Jones2009-04-301-0/+4
|
* Implement lvremove, vgremove, pvremove.Richard Jones2009-04-251-0/+54
|
* Added test suite.Richard Jones2009-04-111-0/+131
|
* Bug fix: Trailing whitespace from 'pvs' command.Richard Jones2009-04-081-0/+6
|
* Implement simple lvs/vgs/pvs commands.Richard Jones2009-04-071-0/+115
|
* Rename pvs -> pvs-full (etc), so we can add simple pvs (etc) commands.Richard Jones2009-04-071-3/+3
|
* pvs/vgs/lvs commands working now.Richard Jones2009-04-071-0/+50