summaryrefslogtreecommitdiffstats
path: root/daemon/realpath.c
Commit message (Collapse)AuthorAgeFilesLines
* daemon: Don't need to prefix error messages with the command name.Richard Jones2010-02-121-3/+3
| | | | | | | | | | | | | | | | | | | | The RPC stubs already prefix the command name to error messages. The daemon doesn't have to do this. As a (small) benefit this also makes the daemon slightly smaller. Code in the daemon such as: if (argv[0] == NULL) { reply_with_error ("passed an empty list"); return NULL; } now results in error messages like this: ><fs> command "" libguestfs: error: command: passed an empty list (whereas previously you would have seen ..command: command:..)
* Make realpath call optional, disable it for Windows.Richard Jones2009-11-261-0/+15
|
* maint: remove unnecessary include of openat.hJim Meyering2009-11-201-2/+0
| | | | * daemon/realpath.c: Don't include "openat.h". not used.
* daemon/Win32: NAME_MAX does not exist on Windows, use FILENAME_MAX instead.Richard Jones2009-11-201-0/+5
|
* convert uses of strcasecmp to STRCASEEQJim Meyering2009-11-091-1/+1
| | | | | git grep -l 'strcasecmp *([^=]*== *0'| xargs \ perl -pi -e 's/\bstrcasecmp( *\(.*?\)) *== *0/STRCASEEQ$1/'
* daemon: Change chdir to use openat/fdopendir.Richard Jones2009-10-261-8/+23
| | | | Uses Gnulib implementation of openat which should be portable.
* New API: case-sensitive-path to return case sensitive path on NTFS 3g fsRichard Jones2009-10-261-0/+122
| | | | | | | | | | | | | | | | | | | | This function handles an annoyance/peculiarity of the Linux NTFS 3g driver, which is that it exports NTFS filesystems with names case sensitive, even though under Windows they would be case insensitive. This causes problems because the location of (eg.) c:\windows might appear as /windows or /WINDOWS (etc) depending on the inconsequential details of how it was originally created. Example of this problem on a real Windows guest: ><fs> file /windows/system32/config/system.log libguestfs: error: file: access: /windows/system32/config/system.log: No such file or directory ><fs> case-sensitive-path /windows/system32/config/system.log /WINDOWS/system32/config/system.LOG ><fs> file /WINDOWS/system32/config/system.LOG MS Windows registry file, NT/2000 or above
* generator.ml: use new "Pathname" designationJim Meyering2009-08-131-4/+1
| | | | | | | | | | 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.
* update all NEED_ROOT usesJim Meyering2009-08-131-1/+1
| | | | | | run this command: git grep -l -w NEED_ROOT|xargs perl -pi -e \ 's/(NEED_ROOT) \((.*?)\)/$1 (return $2)/'
* update all uses of ABS_PATHJim Meyering2009-08-131-1/+1
| | | | | | run this command: git grep -l -w ABS_PATH|xargs perl -pi -e \ 's/(?:ABS_PATH)( \(.*?,) (.*?)\)/ABS_PATH$1 return $2)/'
* Add 'realpath' command.Richard W.M. Jones2009-07-311-0/+47