search for: do_mkdir

Displaying 20 results from an estimated 42 matches for "do_mkdir".

2016 Nov 04
4
[PATCH 0/2] improve Lua API for files and initramfs objects
...n Lua. The documentation indicated that it should be possible (and I believe I did that in an older version). I implemented a few new functions to handle files/initramfs objects better. Changes: * NEW: file:data() returns file contents as a string * NEW: initramfs:load_file(filename, source, mode, do_mkdir) loads a file from source and add it an initramfs object * CHANGED: initramfs:add_file(filename, data, mode, do_mkdir) data can now also be a file loaded by loadfile(name) I've also changed the order of the do_mkdirs and mode arguments and changed the default of do_mkdirs to true...
2016 Aug 03
0
[PATCH] dib: rework run of extra-data.d hooks (RHBZ#1362354)
...network_string out_name root_label @@ -134,10 +135,7 @@ $target_dir/$script (String.concat ":" element_paths) (quote dib_vars) debug in - write_script (destdir // "run-part-extra.sh") run_extra; - - (* Needed as TMPDIR for the extra-data hooks *) - do_mkdir (tmpdir // "tmp") + write_script (destdir // "run-part-extra.sh") run_extra let prepare_aux ~envvars ~dib_args ~dib_vars ~log_file ~out_name ~rootfs_uuid ~arch ~network ~root_label ~install_type ~debug ~extra_packages @@ -392,26 +390,61 @@ let run_parts ~debug ~sysroot ~b...
2012 Apr 05
5
[Bug 8847] New: detect-renamed.diff update to ensure existence of directory for partial-dir
...instead of being detected as renamed existing files. The attached update to detect-renamed.diff addresses this problem by ensuring that the needed directories for partial-dir are created. This is done by use of the equivalent of "mkdir -p" when creating the partial-dir. A new function, do_mkdir_path(), is provided in syscall.c that recursively creates any needed directories. With this change, detect-renamed properly detects files moved to new directories as well as directory renames. The attached detect-renamed.diff replaces the current file. -- Configure bugmail: https://bugzilla.sam...
2016 Aug 03
3
[PATCH] mllib: move _exit from v2v as Exit module
Move the OCaml binding to C _exit to an own module. Just code motion, adapting v2v in the process. --- docs/C_SOURCE_FILES | 2 +- mllib/Makefile.am | 5 ++++- mllib/exit-c.c | 33 +++++++++++++++++++++++++++++++++ mllib/exit.ml | 19 +++++++++++++++++++ mllib/exit.mli | 20 ++++++++++++++++++++ v2v/Makefile.am | 1 - v2v/changeuid-c.c | 33
2015 Nov 11
2
[PATCH 1/2] dib: Make the interface between cmdline.ml and dib.ml explicit.
...ame in + let image_basename = Filename.basename cmdline.image_name in let image_basename_d = image_basename ^ ".d" in let tmpdir = Mkdtemp.temp_dir "dib." "" in @@ -465,15 +461,19 @@ let main () = let extradatatmpdir = tmpdir // "extra-data" in do_mkdir extradatatmpdir; do_mkdir (auxtmpdir // "out" // image_basename_d); - let elements = if use_base then ["base"] @ elements else elements in - let elements = if is_ramdisk then [ramdisk_element] @ elements else elements in + let elements = + if cmdline.use_base then [&quo...
2016 Nov 10
0
[PATCH 0/2] improve Lua API for files and initramfs objects
...ir, mode) local content = readAll (name) initrd:add_file (name, content, mkdir, mode) end All in all, I can't see the need for new bindings for this task, but maybe I miss something. At the same time, file:data() might occasionally come useful. > I've also changed the order of the do_mkdirs and mode arguments and changed > the default of do_mkdirs to true (since that is more useful). This change > is not backwards compatible, but it shouldn't be a big problem since the > new API in the current master branch is not backwards compatible with the > latest release anyways...
2007 Apr 03
0
Modifications to NOT recursively make_backup
...6.6/backup.c Sun Mar 25 20:57:48 2007 --- rsync 2.6.6+/backup.c Tue Apr 3 13:15:32 2007 *************** static int keep_backup(char *fname) *** 204,222 **** } if (!kept && S_ISDIR(file->mode)) { ! /* make an empty directory */ ! if (do_mkdir(buf, file->mode) < 0 ! && (errno != ENOENT || make_bak_dir(buf) < 0 ! || do_mkdir(buf, file->mode) < 0)) { ! rsyserr(FINFO, errno, "mkdir %s failed", ! full_fname(buf));...
2017 Feb 21
0
[PATCH 3/3] dib: rename "aux" to "in_target.aux"
...so that changes there can affect * other phases. *) - let hooks_dir = mount_dir // "tmp" // "aux" // "hooks" in + let hooks_dir = mount_dir // "tmp" // "in_target.aux" // "hooks" in let hook_dir = hooks_dir // hook_name in do_mkdir mount_dir; @@ -479,7 +479,7 @@ let run_install_packages ~debug ~blockdev ~log_file let pkgs_string = String.concat " " packages in message (f_"Installing: %s") pkgs_string; g#write_append log_file (sprintf "Installing %s...\n" pkgs_string); - let out = g#sh...
2002 Jan 07
0
rsync-2.5.1 / updated syscall.c "const" patch
...t char *path, mode_t mode) { if (dry_run) return 0; @@ -99,14 +102,14 @@ } #endif -int do_rename(char *fname1, char *fname2) +int do_rename(const char *fname1, const char *fname2) { if (dry_run) return 0; CHECK_RO return rename(fname1, fname2); } -int do_mkdir(char *fname, mode_t mode) +int do_mkdir(const char *fname, mode_t mode) { if (dry_run) return 0; CHECK_RO @@ -138,7 +141,7 @@ int do_stat(const char *fname, STRUCT_STAT *st) { -#if HAVE_OFF64_T +#ifdef HAVE_OFF64_T return stat64(fname, st); #else return...
2017 Feb 21
3
[PATCH 1/3] dib: unset all temporary dirs envvars in fake-sudo
The real sudo does it as well, and leaving them when preserving the environment (-E) maybe breaks the applications, as e.g. chroot will have a TMPDIR path pointing outside of it. --- dib/dib.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dib/dib.ml b/dib/dib.ml index df83ba1..d15cd19 100644 --- a/dib/dib.ml +++ b/dib/dib.ml @@ -301,6 +301,11 @@ if [ -z \"$preserve_env\" ];
2016 Sep 23
2
[PATCH 1/2] mllib: move remove_duplicates from v2v
Simple code motion. --- mllib/common_utils.ml | 9 +++++++++ mllib/common_utils.mli | 6 ++++++ v2v/utils.ml | 9 --------- v2v/utils.mli | 3 --- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 81d8202..78618f5 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -297,6 +297,15 @@ let sort_uniq
2015 May 29
0
[PATCH v3] RFC: New virt-dib tool
...sdir) + dib_args + (String.concat " " (StringSet.elements all_elements)) + (String.concat ":" element_paths) + (quote dib_vars) + debug in + write_script (destdir // "run-part-extra.sh") run_extra; + + (* Needed as TMPDIR for the extra-data hooks *) + do_mkdir (tmpdir // "tmp") + +let prepare_aux ~envvars ~dib_args ~dib_vars ~log_file ~out_name ~rootfs_uuid + ~arch ~network ~root_label ~install_type ~debug ~extra_packages + destdir all_elements = + let envvars_string = List.map ( + fun (var, value) -> + sprintf "export %s=%s&...
2015 Jul 03
1
[PATCH v5] New tool: virt-dib
...sdir) + dib_args + (String.concat " " (StringSet.elements all_elements)) + (String.concat ":" element_paths) + (quote dib_vars) + debug in + write_script (destdir // "run-part-extra.sh") run_extra; + + (* Needed as TMPDIR for the extra-data hooks *) + do_mkdir (tmpdir // "tmp") + +let prepare_aux ~envvars ~dib_args ~dib_vars ~log_file ~out_name ~rootfs_uuid + ~arch ~network ~root_label ~install_type ~debug ~extra_packages + destdir all_elements = + let envvars_string = List.map ( + fun (var, value) -> + sprintf "export %s=%s&...
2015 Jun 16
2
[PATCH v4] RFC: New tool: virt-dib
...sdir) + dib_args + (String.concat " " (StringSet.elements all_elements)) + (String.concat ":" element_paths) + (quote dib_vars) + debug in + write_script (destdir // "run-part-extra.sh") run_extra; + + (* Needed as TMPDIR for the extra-data hooks *) + do_mkdir (tmpdir // "tmp") + +let prepare_aux ~envvars ~dib_args ~dib_vars ~log_file ~out_name ~rootfs_uuid + ~arch ~network ~root_label ~install_type ~debug ~extra_packages + destdir all_elements = + let envvars_string = List.map ( + fun (var, value) -> + sprintf "export %s=%s&...
2014 Nov 22
3
Use z size specifier for printf-ing size_t variable
...S diff --git a/com32/lib/syslinux/initramfs_file.c b/com32/lib/syslinux/initramfs_file.c index 7eb55b5..9f9fa75 100644 --- a/com32/lib/syslinux/initramfs_file.c +++ b/com32/lib/syslinux/initramfs_file.c @@ -126,7 +126,7 @@ int initramfs_mknod(struct initramfs *ihead, const char *filename, if (do_mkdir) bp += initramfs_mkdirs(filename, bp, bytes); - bp += sprintf(bp, "070701%08x%08x%08x%08x%08x%08x%08x%08x%08x" + bp += sprintf(bp, "070701%08x%08x%08x%08x%08x%08x%08zx%08x%08x" "%08x%08x%08x%08x", next_ino++, mode, 0, 0, 1, 0, len, 0, 1, major, mino...
2015 Mar 31
0
[PATCH] WIP: New virt-dib tool
...sdir) + dib_args + (String.concat " " (StringSet.elements all_elements)) + (String.concat ":" element_paths) + (quote dib_vars) + debug in + write_script (destdir // "run-part-extra.sh") run_extra; + + (* Needed as TMPDIR for the extra-data hooks *) + do_mkdir (tmpdir // "tmp") + +let prepare_aux ~envvars ~dib_args ~dib_vars ~log_file ~out_name ~rootfs_uuid ~arch ~network + ~root_label ~install_type ~debug ~extra_packages + destdir all_elements = + let envvars_string = List.map ( + fun (var, value) -> + sprintf "export %s=%s&...
2003 Sep 05
1
new option suggestion '--backup-only'
...o = saveerrno; switch (errno) { /* external filesystem */ case EXDEV: @@ -225,7 +231,8 @@ } } kept = 1; - do_unlink(fname); + if (!backup_only) + do_unlink(fname); } #endif @@ -233,11 +240,11 @@ /* make an empty directory */ make_bak_dir(fname, backup_dir); do_mkdir(keep_name, file->mode); - ret_code = do_rmdir(fname); - if(verbose>2) { - rprintf(FINFO, "make_backup : RMDIR %s returns %i\n", - fname, ret_code); + if (!backup_only) { + ret_code=do_rmdir(fname); + if(verbose>2) + rprintf(FINFO,"make_backup : RMDIR %s r...
2016 Sep 23
0
[PATCH 2/2] dib: use remove_duplicates instead of own code
...t.iter ( function | "qcow2" | "tar" | "raw" | "vhd" | "docker" -> () diff --git a/dib/utils.ml b/dib/utils.ml index a2046cb..3df5171 100644 --- a/dib/utils.ml +++ b/dib/utils.ml @@ -91,10 +91,6 @@ let digit_prefix_compare a b = let do_mkdir dir = mkdir_p dir 0o755 -let rec remove_dups = function - | [] -> [] - | x :: xs -> x :: (remove_dups (List.filter ((<>) x) xs)) - let require_tool tool = try ignore (which tool) with Executable_not_found tool -> -- 2.7.4
2006 Feb 22
2
DO NOT REPLY [Bug 3542] New: "rsync --list-only a b/" tries to create b
...nation, which is strange because the destination isn't used for anything. Nevertheless, in get_local_name, rsync ensures that the destination is usable, which may involve trying to create the destination as a directory. Luckily, if rsync tries to create the directory, the attempt is caught in do_mkdir and an error message results, but rsync really shouldn't care about the destination at all. The patch I will soon attach causes get_local_name to return NULL immediately if --list-only is given. However, there has to be a better way to ensure the destination is not touched in this situation....
2003 Apr 24
1
Trailing slash in destination
Good afternoon all, I'm currently working on a backup script that will fetch a set of logs from remote machines and store them on a central machine. The command I'm using is of the form ${RSYNC} -avz root@${site}:/data/access_* ${LOG_REPOSITORY}/${site}/ Each site usually holds about 8 files with the prefix "access_". Some machines however only have one, and this is where my