search for: new_path

Displaying 20 results from an estimated 28 matches for "new_path".

2006 Apr 19
0
[patch] Re: Test migration (IMAP copy) and INTERNALDATE?]
...+++ dovecot-1.0.beta7/src/lib-storage/index/maildir/maildir-save.c 2006-04-19 09:47:32.000000000 -0400 @@ -70,9 +70,20 @@ t_strconcat(ctx->newdir, "/", basename, NULL) : t_strconcat(ctx->curdir, "/", dest, NULL); - if (link(tmp_path, new_path) == 0) + if (link(tmp_path, new_path) == 0) { ret = 0; - else { + if (ctx->received_date != (time_t)-1) { + struct utimbuf buf; + /* set the received_date by modifying mtime */ + buf.actim...
2020 Aug 14
0
[libnbd PATCH v2 09/13] info: Simplify by using nbd_opt_go
...- xmlURIPtr xmluri = NULL; int count = nbd_get_nr_list_exports (nbd1); if (count == -1) { @@ -434,49 +432,38 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri) printf ("\t\"exports\": []\n"); for (i = 0; i < count; ++i) { - char *name, *desc, *new_path, *new_uri; + char *name, *desc; struct nbd_handle *nbd2; name = nbd_get_list_export_name (nbd1, i); - if (name) { - /* We have to modify the original URI to change the export name. - * In the URI spec, paths always start with '/' (which is ignored). - */ -...
2020 Jul 29
0
[libnbd PATCH 2/2] info: Expose description in list mode
...if (content) { printf ("\t\"content\": "); print_json_string (content); @@ -402,7 +411,7 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri) xmlURIPtr xmluri = NULL; for (i = 0; i < nbd_get_nr_list_exports (nbd1); ++i) { - char *name, *new_path, *new_uri; + char *name, *desc, *new_path, *new_uri; struct nbd_handle *nbd2; name = nbd_get_list_export_name (nbd1, i); @@ -437,10 +446,12 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri) } /* List the metadata of this export. */ - list_one_export (n...
2013 Jun 12
3
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On Wed, 12 Jun, at 11:17:44AM, Gerardo Exequiel Pozzi wrote: > Cool thanks!. Now looks better, but still not work. > > For some reason, "ldlinux.c32" is apparently sent but "Failed to load" > by PXELINUX and few seconds later, dnsmasq shows an error message > "failed sending": Argh! The patch was broken. I missed the new core/path.c file. My bad.
2013 Jun 12
5
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
...n -1; +} + static void parse_config_file(FILE * f) { char line[MAX_LINE], *p, *ep, ch; @@ -1337,24 +1370,8 @@ do_include: } else if (looking_at(p, "say")) { printf("%s\n", p+4); } else if (looking_at(p, "path")) { - /* PATH-based lookup */ - const char *new_path; - char *_p; - size_t len, new_len; - - new_path = refstrdup(skipspace(p + 4)); - len = strlen(PATH); - new_len = strlen(new_path); - _p = malloc(len + new_len + 2); - if (_p) { - strncpy(_p, PATH, len); - _p[len++] = ':'; - strncpy(_p + len, new_path, new_len); - _p[len + ne...
2013 Jun 12
0
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
...n -1; +} + static void parse_config_file(FILE * f) { char line[MAX_LINE], *p, *ep, ch; @@ -1337,24 +1370,8 @@ do_include: } else if (looking_at(p, "say")) { printf("%s\n", p+4); } else if (looking_at(p, "path")) { - /* PATH-based lookup */ - const char *new_path; - char *_p; - size_t len, new_len; - - new_path = refstrdup(skipspace(p + 4)); - len = strlen(PATH); - new_len = strlen(new_path); - _p = malloc(len + new_len + 2); - if (_p) { - strncpy(_p, PATH, len); - _p[len++] = ':'; - strncpy(_p + len, new_path, new_len); - _p[len + ne...
2013 Jun 11
2
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On Mon, 10 Jun, at 07:57:50AM, H. Peter Anvin wrote: > Either that or make the path a list rather than a string, using the > normal word separators when entered on the command line, a bit like the > (t)csh does. That is a bigger change but is probably a better solution. How would this solution handle filenames containing spaces? Would we need to escape (presumably with a backslash)
2013 Jun 12
0
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
...e(FILE * f) > { > char line[MAX_LINE], *p, *ep, ch; > @@ -1337,24 +1370,8 @@ do_include: > } else if (looking_at(p, "say")) { > printf("%s\n", p+4); > } else if (looking_at(p, "path")) { > - /* PATH-based lookup */ > - const char *new_path; > - char *_p; > - size_t len, new_len; > - > - new_path = refstrdup(skipspace(p + 4)); > - len = strlen(PATH); > - new_len = strlen(new_path); > - _p = malloc(len + new_len + 2); > - if (_p) { > - strncpy(_p, PATH, len); > - _p[len++] = ':'; > -...
2020 Jul 29
3
[libnbd PATCH 0/2] Expose export description
An incremental improvement on top of listing exports. I still think it's worth experimenting with revisiting how our API for list mode should actually work [1] (so that we can reuse a single connection for both grabbing the list and finally using NBD_OPT_GO), but this change was easier to whip together while still thinking about that. [1]
2016 Nov 30
0
Re: [PATCH] builder: Rearrange how template-building scripts work.
...rig_path = Unix.getenv "PATH" in > + let paths = ["builder"; "customize"; "sparsify"; "sysprep"] in > + let prefix = Sys.getcwd () // ".." // ".." in > + let paths = List.map ((//) prefix) paths in > + let new_path = String.concat ":" (paths @ [orig_path]) in > + Unix.putenv "PATH" new_path in Wouldn't be better just rely on the libguestfs tools in $PATH, i.e. using ./run for uninstalled versions? Just use a check similar to the one below (inspired from virt-builder): (* Chec...
1998 Oct 14
0
The poisoned NUL byte
...lative pathname use getwd for starters. */ if (*path != ''/'') { /* Ohoo... */ @@ -122,7 +122,7 @@ } /* Safely copy the next pathname component. */ while (*path != ''\0'' && *path != ''/'') { - if (path > max_path) { + if (new_path > max_path) { errno = ENAMETOOLONG; return NULL; } ------------------------------------------------------------------ -- Olaf Kirch | --- o --- Nous sommes du soleil we love when we play okir@monad.swb.de | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax okir@calder...
2011 May 25
1
[GIT PULL] elflink ldlinux
Hi, These patches contain support for some features that are already in Syslinux 4 but weren't working properly on the elflink branch. It's another step closer to feature parity with Syslinux 4. Having to jump through the comboot API for localboot support is less than ideal and I'll eventually fix that, probably when we move a big chunk of code from asm to C. Also, there's a
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...%s", filename); > + ret = fd; > + goto out; > + } > + > + warg->vps = s; > + warg->elem = elem; > + warg->req = req; > + > + warg->ioc = qio_channel_new_fd(fd, &err); Same point about using new_path() instead of new_fd() > + if (err) { > + error_reportf_err(err, "cannot create io channel: "); > + goto out; > + } > + > + qio_channel_set_blocking(warg->ioc, false, &err); > + qio_channel_add_watch(warg->ioc, G_IO_OUT, pstore_asyn...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...%s", filename); > + ret = fd; > + goto out; > + } > + > + warg->vps = s; > + warg->elem = elem; > + warg->req = req; > + > + warg->ioc = qio_channel_new_fd(fd, &err); Same point about using new_path() instead of new_fd() > + if (err) { > + error_reportf_err(err, "cannot create io channel: "); > + goto out; > + } > + > + qio_channel_set_blocking(warg->ioc, false, &err); > + qio_channel_add_watch(warg->ioc, G_IO_OUT, pstore_asyn...
2011 Mar 31
3
[PATCH 1/3] VFS/ioctl: Add punching-hole support to ioctl().
We're currently support two paths from VFS to preallocate unwritten extents(from FS_IOC_RESVSP, or fallocate()), likewise, behavior of punching-hole should be treated as the same, this patch tries to teach file_ioctl() to handle FS_IOC_UNRESVSP, underlying filesystem like ocfs2 is wise enough to do the rest of work;-) Signed-off-by: Tristan Ye <tristan.ye at oracle.com> --- fs/ioctl.c
2011 Mar 31
3
[PATCH 1/3] VFS/ioctl: Add punching-hole support to ioctl().
We're currently support two paths from VFS to preallocate unwritten extents(from FS_IOC_RESVSP, or fallocate()), likewise, behavior of punching-hole should be treated as the same, this patch tries to teach file_ioctl() to handle FS_IOC_UNRESVSP, underlying filesystem like ocfs2 is wise enough to do the rest of work;-) Signed-off-by: Tristan Ye <tristan.ye at oracle.com> --- fs/ioctl.c
2016 Aug 26
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...> + goto out; > > + } > > + > > + warg->vps = s; > > + warg->elem = elem; > > + warg->req = req; > > + > > + warg->ioc = qio_channel_new_fd(fd, &err); > > Same point about using new_path() instead of new_fd() OK. > > > + if (err) { > > + error_reportf_err(err, "cannot create io channel: "); > > + goto out; > > + } > > + > > + qio_channel_set_blocking(warg->ioc, false, &err); > > + qio_channel...
2012 Apr 17
2
[GIT PULL] elflink warning fixes and auto extension support
...rial setting, bps, flow control */ else if (looking_at(p, "serial")) { - com32sys_t ireg; uint16_t port, flow; uint32_t baud; @@ -1309,7 +1310,8 @@ do_include: eprintf("%s\n", p+4); } else if (looking_at(p, "path")) { /* PATH-based lookup */ - char *new_path, *_p; + const char *new_path; + char *_p; size_t len, new_len; new_path = refstrdup(skipspace(p + 4)); @@ -1348,7 +1350,7 @@ static int parse_one_config(const char *filename) if (config_cwd[0]) { chdir(config_cwd); - config_cwd[0] = NULL; + config_cwd[0] = '\0'; } r...
2020 Aug 03
5
[libnbd PATCH 0/4] More nbdinfo fixes
This rounds up the remaining bugs that I originally identified in: https://www.redhat.com/archives/libguestfs/2020-July/msg00153.html Eric Blake (4): api: Permit export list APIs when Connected info: Support --list with serializing servers info: Fix --json output when list size != 1 info: Permit --size --json generator/API.ml | 6 +++--- info/info-list-json.sh | 9 +++++++++
2020 Aug 14
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
Well, I'm not quite done (I still want to get nbdinfo to work on a single nbd connection for all cases when reading the heads of the file is not required), but I'm happy with patches 1-11, and 12-13 show where I'm headed for getting NBD_OPT_INFO to work. Posting now to see if some of the earlier patches are ready to commit while I continue working on the latter half. Eric Blake (13):