summaryrefslogtreecommitdiffstats
path: root/daemon/readdir.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace 'int' with 'size_t' passim.Richard W.M. Jones2012-03-131-1/+1
| | | | | Analyze all uses of 'int' in the code, and replace with 'size_t' where appropriate.
* Update FSF address.Matthew Booth2011-11-081-1/+1
|
* daemon/Win32: make some functions and fields optional.Richard Jones2009-11-201-0/+4
| | | | | | | | | | | | 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.
* 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)/'
* Convert all TABs-as-indentation to spaces.Jim Meyering2009-08-031-1/+1
| | | | | | | | | | | Do it by running this command: [exempted files are matched via .x-sc_TAB_in_indentation] git ls-files \ | pcregrep -vf .x-sc_TAB_in_indentation \ | xargs pcregrep -l '^ *\t' \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
* remove trailing blanksJim Meyering2009-07-031-1/+1
|
* daemon/readdir: avoid a small leakJim Meyering2009-07-031-0/+2
| | | | | * daemon/readdir.c (do_readdir): Free both p and v.name, in case only one of the allocations failed.
* Add 'readdir' call.Richard W.M. Jones2009-07-021-0/+105
This adds a readdir call (mostly intended for programs). The return value is a list of guestfs_dirent structures. This adds the new types 'struct guestfs_dirent' and 'struct guestfs_dirent_list', along with all the code to return these in the different language bindings. Also includes additional tests for OCaml and Perl bindings to test this.