mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
generator.ml: use new "Pathname" designation
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.
This commit is contained in:
@@ -36,7 +36,7 @@ write_cb (void *fd_ptr, const void *buf, int len)
|
||||
|
||||
/* Has one FileIn parameter. */
|
||||
int
|
||||
do_upload (char *filename)
|
||||
do_upload (const char *filename)
|
||||
{
|
||||
int err, fd, r, is_dev;
|
||||
|
||||
@@ -88,7 +88,7 @@ do_upload (char *filename)
|
||||
|
||||
/* Has one FileOut parameter. */
|
||||
int
|
||||
do_download (char *filename)
|
||||
do_download (const char *filename)
|
||||
{
|
||||
int fd, r, is_dev;
|
||||
char buf[GUESTFS_MAX_CHUNK_SIZE];
|
||||
|
||||
Reference in New Issue
Block a user