summaryrefslogtreecommitdiffstats
path: root/daemon/stat.c
Commit message (Collapse)AuthorAgeFilesLines
* daemon: Don't use ../src path to include generator_protocol.hRichard W.M. Jones2010-11-031-1/+1
| | | | | This file is already hard-linked into the current directory, so the relative path is not required.
* daemon: Print failed path in stat command errors.Richard W.M. Jones2010-10-251-2/+2
|
* daemon: Don't need to prefix error messages with the command name.Richard Jones2010-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | 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:..)
* daemon: Move statvfs code into separate file.Richard Jones2009-11-251-38/+0
| | | | | | This makes no functional change to the code. It just moves the statvfs-related code out of daemon/stat.c into a new file called daemon/statvfs.c.
* daemon/Win32: make some functions and fields optional.Richard Jones2009-11-201-0/+24
| | | | | | | | | | | | inotify: Make this optional on platforms that don't have this interface. mknod, mkfifo etc.: Make these optional on non-Unix platforms. readdir: If d_type field is missing on the platform, set the corresponding field to 'u'. stat: st_blocks and st_blksize are missing on non-Unix platforms, so set these fields to -1 in the corresponding structures.
* New API calls: lstatlist, lxattrlist, readlinklist.Richard Jones2009-11-021-0/+68
| | | | | | | | These three functions are very specifically designed for FUSE support, so we can list directories efficiently. Instead of making lots of lstat, lgetxattr and readlink calls, we can make just three calls per directory to grab all the attributes (which we then cache briefly).
* generator.ml: use new "Pathname" designationJim Meyering2009-08-131-12/+3
| | | | | | | | | | 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-3/+3
| | | | | | 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-3/+3
| | | | | | run this command: git grep -l -w ABS_PATH|xargs perl -pi -e \ 's/(?:ABS_PATH)( \(.*?,) (.*?)\)/ABS_PATH$1 return $2)/'
* remove trailing blanksJim Meyering2009-07-031-1/+1
|
* In the daemon, change all const char * parameters to char *.Richard Jones2009-06-101-3/+3
|
* Added stat, lstat, statvfs and associated stat structures.Richard Jones2009-04-151-0/+155