docs: Clarify documentation for mknod (RHBZ#582948).
authorRichard Jones <rjones@redhat.com>
Mon, 19 Apr 2010 19:13:05 +0000 (20:13 +0100)
committerRichard Jones <rjones@redhat.com>
Mon, 19 Apr 2010 19:13:05 +0000 (20:13 +0100)
src/generator.ml

index b274411..1075878 100755 (executable)
@@ -2989,6 +2989,14 @@ constants.  C<devmajor> and C<devminor> are the
 device major and minor numbers, only used when creating block
 and character special devices.
 
 device major and minor numbers, only used when creating block
 and character special devices.
 
+Note that, just like L<mknod(2)>, the mode must be bitwise
+OR'd with S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call
+just creates a regular file).  These constants are
+available in the standard Linux header files, or you can use
+C<guestfs_mknod_b>, C<guestfs_mknod_c> or C<guestfs_mkfifo>
+which are wrappers around this command which bitwise OR
+in the appropriate constant for you.
+
 The mode actually set is affected by the umask.");
 
   ("mkfifo", (RErr, [Int "mode"; Pathname "path"]), 134, [Optional "mknod"],
 The mode actually set is affected by the umask.");
 
   ("mkfifo", (RErr, [Int "mode"; Pathname "path"]), 134, [Optional "mknod"],