Generated code for mknod, mkfifo, mknod_b, mknod_c, umask.
[libguestfs.git] / guestfs-actions.pod
index aade37b..50eba95 100644 (file)
@@ -885,6 +885,22 @@ C<device>.
 This function returns a string, or NULL on error.
 I<The caller must free the returned string after use>.
 
+=head2 guestfs_get_memsize
+
+ int guestfs_get_memsize (guestfs_h *handle);
+
+This gets the memory size in megabytes allocated to the
+qemu subprocess.
+
+If C<guestfs_set_memsize> was not called
+on this handle, and if C<LIBGUESTFS_MEMSIZE> was not set,
+then this returns the compiled-in default value for memsize.
+
+For more information on the architecture of libguestfs,
+see L<guestfs(3)>.
+
+On error this function returns -1.
+
 =head2 guestfs_get_path
 
  const char *guestfs_get_path (guestfs_h *handle);
@@ -1319,6 +1335,18 @@ See also: L<mkdtemp(3)>
 This function returns a string, or NULL on error.
 I<The caller must free the returned string after use>.
 
+=head2 guestfs_mkfifo
+
+ int guestfs_mkfifo (guestfs_h *handle,
+               int mode,
+               const char *path);
+
+This call creates a FIFO (named pipe) called C<path> with
+mode C<mode>.  It is just a convenient wrapper around
+C<guestfs_mknod>.
+
+This function returns 0 on success or -1 on error.
+
 =head2 guestfs_mkfs
 
  int guestfs_mkfs (guestfs_h *handle,
@@ -1331,6 +1359,52 @@ example C<ext3>.
 
 This function returns 0 on success or -1 on error.
 
+=head2 guestfs_mknod
+
+ int guestfs_mknod (guestfs_h *handle,
+               int mode,
+               int devmajor,
+               int devminor,
+               const char *path);
+
+This call creates block or character special devices, or
+named pipes (FIFOs).
+
+The C<mode> parameter should be the mode, using the standard
+constants.  C<devmajor> and C<devminor> are the
+device major and minor numbers, only used when creating block
+and character special devices.
+
+This function returns 0 on success or -1 on error.
+
+=head2 guestfs_mknod_b
+
+ int guestfs_mknod_b (guestfs_h *handle,
+               int mode,
+               int devmajor,
+               int devminor,
+               const char *path);
+
+This call creates a block device node called C<path> with
+mode C<mode> and device major/minor C<devmajor> and C<devminor>.
+It is just a convenient wrapper around C<guestfs_mknod>.
+
+This function returns 0 on success or -1 on error.
+
+=head2 guestfs_mknod_c
+
+ int guestfs_mknod_c (guestfs_h *handle,
+               int mode,
+               int devmajor,
+               int devminor,
+               const char *path);
+
+This call creates a char device node called C<path> with
+mode C<mode> and device major/minor C<devmajor> and C<devminor>.
+It is just a convenient wrapper around C<guestfs_mknod>.
+
+This function returns 0 on success or -1 on error.
+
 =head2 guestfs_mkswap
 
  int guestfs_mkswap (guestfs_h *handle,
@@ -1737,6 +1811,24 @@ to return the existing UUID of a filesystem.
 
 This function returns 0 on success or -1 on error.
 
+=head2 guestfs_set_memsize
+
+ int guestfs_set_memsize (guestfs_h *handle,
+               int memsize);
+
+This sets the memory size in megabytes allocated to the
+qemu subprocess.  This only has any effect if called before
+C<guestfs_launch>.
+
+You can also change this by setting the environment
+variable C<LIBGUESTFS_MEMSIZE> before the handle is
+created.
+
+For more information on the architecture of libguestfs,
+see L<guestfs(3)>.
+
+This function returns 0 on success or -1 on error.
+
 =head2 guestfs_set_path
 
  int guestfs_set_path (guestfs_h *handle,
@@ -2135,6 +2227,25 @@ The array of strings will always have length C<2n+1>, where
 C<n> keys and values alternate, followed by the trailing NULL entry.
 I<The caller must free the strings and the array after use>.
 
+=head2 guestfs_umask
+
+ int guestfs_umask (guestfs_h *handle,
+               int mask);
+
+This function sets the mask used for creating new files and
+device nodes to C<mask & 0777>.
+
+Typical umask values would be C<022> which creates new files
+with permissions like "-rw-r--r--" or "-rwxr-xr-x", and
+C<002> which creates new files with permissions like
+"-rw-rw-r--" or "-rwxrwxr-x".
+
+See also L<umask(2)>, C<guestfs_mknod>, C<guestfs_mkdir>.
+
+This call returns the previous umask.
+
+On error this function returns -1.
+
 =head2 guestfs_umount
 
  int guestfs_umount (guestfs_h *handle,