Do not issue a warning when chflags() fails with EOPNOTSUPP.

PR:		17875
Submitted by:	Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE>
This commit is contained in:
Sheldon Hearn 2000-04-13 09:39:29 +00:00
parent ddf48d5ff5
commit 1806a85c5a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59198
2 changed files with 3 additions and 2 deletions

View File

@ -493,7 +493,7 @@ main(argc, argv)
* Since it isn't clear that flags are useful on character
* devices, we just clear them.
*/
if (chflags(ttyn, 0))
if (chflags(ttyn, 0) && (errno != EOPNOTSUPP))
syslog(LOG_ERR, "chmod(%s): %m", ttyn);
if (chown(ttyn, pwd->pw_uid,
(gr = getgrnam(TTYGRPNAME)) ? gr->gr_gid : pwd->pw_gid))

View File

@ -13,6 +13,7 @@
* warranties, including, without limitation, the implied warranties of
* merchantibility and fitness for any particular purpose.
************************************************************************/
/* $FreeBSD$ */
/*
SYNOPSIS
void login_fbtab(tty, uid, gid)
@ -133,7 +134,7 @@ gid_t gid;
if (strcmp("/*", path + pathlen - 2) != 0) {
/* clear flags of the device */
if (chflags(path, 0) && errno != ENOENT)
if (chflags(path, 0) && (errno != ENOENT) && (errno != EOPNOTSUPP))
syslog(LOG_ERR, "%s: chflags(%s): %m", table, path);
if (chmod(path, mask) && errno != ENOENT)
syslog(LOG_ERR, "%s: chmod(%s): %m", table, path);