summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-04-17 13:07:56 +0100
committerRichard Jones <rjones@redhat.com>2010-04-17 13:07:56 +0100
commit4e5327187d6474e81241dd2b6f5418be2387a0cb (patch)
tree9f40c31a4c5d9256bf4a725578fca4dc35643603 /src
parent116d497c68c2e57f6e92abf8834112a794a145f0 (diff)
New API: get-umask, returns the current umask (RHBZ#582891).
Diffstat (limited to 'src')
-rw-r--r--src/MAX_PROC_NR2
-rwxr-xr-xsrc/generator.ml11
2 files changed, 11 insertions, 2 deletions
diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR
index b4249c47..eb08bc0b 100644
--- a/src/MAX_PROC_NR
+++ b/src/MAX_PROC_NR
@@ -1 +1 @@
-239
+240
diff --git a/src/generator.ml b/src/generator.ml
index b97584ab..61323a92 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -3034,7 +3034,8 @@ The default umask is C<022>. This is important because it
means that directories and device nodes will be created with
C<0644> or C<0755> mode even if you specify C<0777>.
-See also L<umask(2)>, C<guestfs_mknod>, C<guestfs_mkdir>.
+See also C<guestfs_get_umask>,
+L<umask(2)>, C<guestfs_mknod>, C<guestfs_mkdir>.
This call returns the previous umask.");
@@ -4484,6 +4485,14 @@ group.");
Set the value associated with C<path> to C<NULL>. This
is the same as the L<augtool(1)> C<clear> command.");
+ ("get_umask", (RInt "mask", []), 240, [FishOutput FishOutputOctal],
+ [InitEmpty, Always, TestOutputInt (
+ [["get_umask"]], 0o22)],
+ "get the current umask",
+ "\
+Return the current umask. By default the umask is C<022>
+unless it has been set by calling C<guestfs_umask>.");
+
]
let all_functions = non_daemon_functions @ daemon_functions