]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(grantpt): Add support for devfs.
authorUlrich Drepper <drepper@redhat.com>
Wed, 17 Nov 1999 20:36:27 +0000 (20:36 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 17 Nov 1999 20:36:27 +0000 (20:36 +0000)
sysdeps/unix/sysv/linux/grantpt.c

index 668f13192ebd59a96e2fdf574614b8a8765acbf6..c6252eaf79777bb243fd0d8a24da158b03ef22c6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,9 @@
 /* Constant that identifies the `devpts' filesystem.  */
 #define DEVPTS_SUPER_MAGIC     0x1cd1
 
+/* Constant that identifies the `devfs' filesystem.  */
+#define DEVFS_SUPER_MAGIC      0x1373
+
 /* Prototype for function that changes ownership and access permission
    for slave pseudo terminals that do not live on a `devpts'
    filesystem.  */
@@ -54,7 +57,7 @@ grantpt (int fd)
 
   /* If the slave pseudo terminal lives on a `devpts' filesystem, the
      ownership and access permission are already set.  */
-  if (fsbuf.f_type == DEVPTS_SUPER_MAGIC)
+  if (fsbuf.f_type == DEVPTS_SUPER_MAGIC || fsbuf.f_type == DEVFS_SUPER_MAGIC)
     return 0;
 
   return __unix_grantpt (fd);