| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* daemon/df.c (do_df, do_df_h): Add "void".
* sync.c (do_sync): Likewise.
|
|
|
|
|
|
| |
Also, ...
* src/generator.ml: Add DeviceList type, and propagate that change
out to all calling/interface code.
|
|
|
|
|
|
|
|
|
|
| |
mkfs-b: Pass the -b (blocksize) parameter to mkfs.
mke2journal and friends: Lets you create external ext2 journals on
devices.
mke2fs-J and friends: Lets you create ext2/3/4 filesystems with
external journals.
|
|
|
|
| |
* daemon/configure.ac: Change a leading TAB to 8 spaces.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* daemon/sfdisk.c (sfdisk): Don't let outrageous "extra_flag"
or "device" strings overflow a fixed-size buffer.
|
|
|
|
|
| |
* daemon/mount.c (do_umount): Don't use RESOLVE_DEVICE here,
now that the caller always invokes REQUIRE_ROOT_OR_RESOLVE_DEVICE.
|
|
|
|
|
|
|
|
|
|
| |
* src/generator.ml: Update all rules to handle Dev_or_Path.
(the above changes to generator.ml are mostly mechanical)
Emit a use of REQUIRE_ROOT_OR_RESOLVE_DEVICE.
* daemon/upload.c (do_download): Remove use of
REQUIRE_ROOT_OR_RESOLVE_DEVICE, now that it's automatically done
in calling code.
* daemon/file.c (do_file): Likewise.
|
|
|
|
|
| |
* daemon/dir.c (do_mkdtemp): Rewrite for a "const" parameter.
* src/generator.ml (mkdtemp): Declare parameter to be of type Pathname.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
run this command:
git grep -l -w NEED_ROOT|xargs perl -pi -e \
's/(NEED_ROOT) \((.*?)\)/$1 (return $2)/'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
* daemon/file.c (do_cat): fix an ABS_PATH use
|
|
|
|
|
|
| |
run this command:
git grep -l -w ABS_PATH|xargs perl -pi -e \
's/(?:ABS_PATH)( \(.*?,) (.*?)\)/ABS_PATH$1 return $2)/'
|
|
|
|
|
|
| |
changing IS_DEVICE semantics leads to changing semantics of
NEED_ROOT_OR_IS_DEVICE and NEED_ROOT, too.
* daemon/daemon.h: Update definitions.
|
| |
|
|
|
|
|
|
| |
Use this command:
git grep -l -w IS_DEVICE|xargs perl -pi -e \
's/\b(?:IS_DEVICE)\b( \(.*?,) (.*?)\)/RESOLVE_DEVICE$1 return $2)/'
|
|
|
|
|
| |
Change parameter from "errcode" (which would be returned) to "fail_stmt"
so that a caller can specify e.g., "goto done" upon failure.
|
| |
|
| |
|
|
|
|
|
|
| |
If selinux=1 on the Linux kernel command line, then we mount
/selinux in the appliance. We will also bind-mount this
directory into guests when we run commands.
|
|
|
|
|
| |
* ls.c (do_ll): Do invoke "NEED_ROOT" here, and add a FIXME to
provide a "debug ll" command with the semantics we're removing.
|
|
|
|
|
|
|
| |
* configure.ac: Use AM_SILENT_RULES([yes]).
Those who want verbose build output may configure with
--disable-silent-rules or use "make V=1".
* daemon/configure.ac: Likewise.
|
|
|
|
|
|
|
|
|
| |
* daemon/debug.c (MAYBE_UNUSED): Define.
(do_debug): Mark parameters as unused only when they really
are unused. Spotted by Richard Jones.
SCALAR(0xdd8370)
prefer sizeof *VAR sizeof TYPE (no semantic change)
|
|
|
|
|
|
|
|
| |
Avoid "comparison between signed and unsigned integer expressions"
warnings. If it's at all hard or risky to avoid this type of warning,
then it's not worthwhile. Here, it's easy and safe.
* daemon/inotify.c (inotify_posn): Declare local to be of unsigned type.
(do_inotify_read, do_inotify_files): Likewise.
|
|
|
|
|
| |
* daemon/guestfsd.c (print_arginfo, print_shell_quote): Mark each
"info" parameter as unused.
|
|
|
|
| |
* daemon/debug.c (do_debug): Mark parameters as unused.
|
|
|
|
| |
* daemon/daemon.h (__attribute__, ATTRIBUTE_UNUSED): Define.
|
|
|
|
|
|
| |
* daemon/file.c (do_file): Remove redundant use of ABS_PATH.
It's redundant because the preceding line invokes NEED_ROOT_OR_IS_DEVICE,
which also invokes ABS_PATH.
|
|
|
|
|
| |
Otherwise mkswap will give a silly error if you ask it to
swap on a whole device.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* daemon/Makefile.am (SUBDIRS): Define.
(AM_CPPFLAGS): Define, to include from gnulib's lib/
(LDADD): Define, to link with gnulib's libgnu.a.
* daemon/configure.ac: Use AC_CONFIG_AUX_DIR([build-aux]),
gl_EARLY and gl_INIT.
(AC_CONFIG_FILES): Add lib/Makefile and tests/Makefile
* daemon/m4/gnulib-cache.m4: New file, generated by running
../.gnulib/gnulib-tool --import --with-tests hash
* daemon/.gitignore: Ignore all of the imported files.
build: tell bootstrap about daemon/
* bootstrap: Run gnulib-tool --update in daemon/.
Remove bootstrap's --gnulib-srcdir option, because it probably
didn't work, and even if it did, we've discovered that using
a separate git repo like that can lead to subtle mix-ups.
|
|
|
|
|
|
| |
Also:
* Un-duplicate device detection code by creating a common mapping function.
* Add some more comments.
|
|
|
|
|
|
|
|
|
|
|
| |
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 : $_'
|
|
|
|
|
|
|
| |
* cfg.mk (disable_temporarily): Remove sc_const_long_option.
* daemon/guestfsd.c (main): Declare long_options to be "const".
* fish/fish.c (main): Likewise.
* test-tool/test-tool.c (main): Likewise.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
swapon-device
swapoff-device
swapon-file
swapoff-file
swapon-label
swapoff-label
swapon-uuid
swapoff-uuid
mkswap-file
|
| |
|
|
|
|
|
| |
These commands can be used to make hard and symbolic links. The
readlink command is used to read existing symbolic links.
|