mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-15 05:20:05 +00:00
Update.
1999-11-09 Andreas Jaeger <aj@suse.de> * sysdeps/unix/sysv/linux/grantpt.c (grantpt): Add support for devfs. * sysdeps/unix/sysv/linux/getpt.c (__getpt): Check for devfs. Patch by German Jose Gomez Garcia <german@pinon.ccu.uniovi.es>. * sysdeps/unix/sysv/linux/linux_fsinfo.h (DEVFS_SUPER_MAGIC): Added.
This commit is contained in:
parent
eccb7fb492
commit
9c9f3b1785
@ -1,3 +1,12 @@
|
|||||||
|
1999-11-09 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/grantpt.c (grantpt): Add support for devfs.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/getpt.c (__getpt): Check for devfs.
|
||||||
|
Patch by German Jose Gomez Garcia <german@pinon.ccu.uniovi.es>.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/linux_fsinfo.h (DEVFS_SUPER_MAGIC): Added.
|
||||||
|
|
||||||
1999-11-17 Ulrich Drepper <drepper@cygnus.com>
|
1999-11-17 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
* sysdeps/gnu/netinet/tcp.h: Add TCP_CORK definition.
|
* sysdeps/gnu/netinet/tcp.h: Add TCP_CORK definition.
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
/* Constant that identifies the `devpts' filesystem. */
|
/* Constant that identifies the `devpts' filesystem. */
|
||||||
#define DEVPTS_SUPER_MAGIC 0x1cd1
|
#define DEVPTS_SUPER_MAGIC 0x1cd1
|
||||||
|
|
||||||
|
/* Constant that identifies the `devfs' filesystem. */
|
||||||
|
#define DEVFS_SUPER_MAGIC 0x1373
|
||||||
|
|
||||||
/* Path to the master pseudo terminal cloning device. */
|
/* Path to the master pseudo terminal cloning device. */
|
||||||
#define _PATH_DEVPTMX _PATH_DEV "ptmx"
|
#define _PATH_DEVPTMX _PATH_DEV "ptmx"
|
||||||
/* Directory containing the UNIX98 pseudo terminals. */
|
/* Directory containing the UNIX98 pseudo terminals. */
|
||||||
@ -50,10 +53,13 @@ __getpt (void)
|
|||||||
struct statfs fsbuf;
|
struct statfs fsbuf;
|
||||||
static int devpts_mounted;
|
static int devpts_mounted;
|
||||||
|
|
||||||
/* Check that the /dev/pts filesystem is mounted. */
|
/* Check that the /dev/pts filesystem is mounted
|
||||||
|
or if /dev is a devfs filesystem (this implies /dev/pts). */
|
||||||
if (devpts_mounted
|
if (devpts_mounted
|
||||||
|| (__statfs (_PATH_DEVPTS, &fsbuf) == 0
|
|| (__statfs (_PATH_DEVPTS, &fsbuf) == 0
|
||||||
&& fsbuf.f_type == DEVPTS_SUPER_MAGIC))
|
&& fsbuf.f_type == DEVPTS_SUPER_MAGIC)
|
||||||
|
|| (__statfs (_PATH_DEV, &fsbuf) == 0
|
||||||
|
&& fsbuf.f_type == DEVFS_SUPER_MAGIC))
|
||||||
{
|
{
|
||||||
/* Everything is ok. */
|
/* Everything is ok. */
|
||||||
devpts_mounted = 1;
|
devpts_mounted = 1;
|
||||||
|
@ -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.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -23,6 +23,9 @@
|
|||||||
/* Constant that identifies the `devpts' filesystem. */
|
/* Constant that identifies the `devpts' filesystem. */
|
||||||
#define DEVPTS_SUPER_MAGIC 0x1cd1
|
#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
|
/* Prototype for function that changes ownership and access permission
|
||||||
for slave pseudo terminals that do not live on a `devpts'
|
for slave pseudo terminals that do not live on a `devpts'
|
||||||
filesystem. */
|
filesystem. */
|
||||||
@ -54,7 +57,7 @@ grantpt (int fd)
|
|||||||
|
|
||||||
/* If the slave pseudo terminal lives on a `devpts' filesystem, the
|
/* If the slave pseudo terminal lives on a `devpts' filesystem, the
|
||||||
ownership and access permission are already set. */
|
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 0;
|
||||||
|
|
||||||
return __unix_grantpt (fd);
|
return __unix_grantpt (fd);
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#define BFS_MAGIC 0x1BADFACE
|
#define BFS_MAGIC 0x1BADFACE
|
||||||
#define CODA_SUPER_MAGIC 0x73757245
|
#define CODA_SUPER_MAGIC 0x73757245
|
||||||
#define DEVPTS_SUPER_MAGIC 0x1cd1
|
#define DEVPTS_SUPER_MAGIC 0x1cd1
|
||||||
|
#define DEVFS_SUPER_MAGIC 0x1373
|
||||||
#define EFS_SUPER_MAGIC 0x414A53
|
#define EFS_SUPER_MAGIC 0x414A53
|
||||||
#define EXT2_SUPER_MAGIC 0xef53
|
#define EXT2_SUPER_MAGIC 0xef53
|
||||||
#define HPFS_SUPER_MAGIC 0xf995e849
|
#define HPFS_SUPER_MAGIC 0xf995e849
|
||||||
|
Loading…
Reference in New Issue
Block a user