CVS commit: src/usr.bin/eject
Module Name:src Committed By: abs Date: Sat Jul 14 20:41:27 UTC 2012 Modified Files: src/usr.bin/eject: eject.c Log Message: racd *should* be ejectable. Kernel side to come To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.bin/eject/eject.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/eject/eject.c diff -u src/usr.bin/eject/eject.c:1.26 src/usr.bin/eject/eject.c:1.27 --- src/usr.bin/eject/eject.c:1.26 Wed Jun 23 18:07:59 2010 +++ src/usr.bin/eject/eject.c Sat Jul 14 20:41:27 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: eject.c,v 1.26 2010/06/23 18:07:59 yamt Exp $ */ +/* $NetBSD: eject.c,v 1.27 2012/07/14 20:41:27 abs Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1999\ #endif/* not lint */ #ifndef lint -__RCSID("$NetBSD: eject.c,v 1.26 2010/06/23 18:07:59 yamt Exp $"); +__RCSID("$NetBSD: eject.c,v 1.27 2012/07/14 20:41:27 abs Exp $"); #endif/* not lint */ #include @@ -74,23 +74,24 @@ struct nicknames_s { # define FLOPPY 0x2 # define TYPEMASK ((int)~0x01) } nicknames[] = { - { "diskette", "fd", DISK | FLOPPY | NOTLOADABLE }, - { "floppy", "fd", DISK | FLOPPY | NOTLOADABLE }, - { "fd", "fd", DISK | FLOPPY | NOTLOADABLE }, - { "sd", "sd", DISK | NOTLOADABLE }, - { "cdrom","cd", DISK | LOADABLE }, - { "cd", "cd", DISK | LOADABLE }, - { "cdr", "cd", DISK | LOADABLE }, - { "cdrw", "cd", DISK | LOADABLE }, - { "dvdrom", "cd", DISK | LOADABLE }, - { "dvd", "cd", DISK | LOADABLE }, - { "dvdr", "cd", DISK | LOADABLE }, - { "dvdrw","cd", DISK | LOADABLE }, - { "mcd", "mcd", DISK | LOADABLE }, /* XXX Is this true? */ - { "tape", "st", TAPE | NOTLOADABLE }, - { "st", "st", TAPE | NOTLOADABLE }, - { "dat", "st", TAPE | NOTLOADABLE }, - { "exabyte", "st", TAPE | NOTLOADABLE } + { "diskette", "fd", DISK | FLOPPY | NOTLOADABLE }, + { "floppy", "fd", DISK | FLOPPY | NOTLOADABLE }, + { "fd", "fd", DISK | FLOPPY | NOTLOADABLE }, + { "sd", "sd", DISK | NOTLOADABLE }, + { "cdrom","cd", DISK | LOADABLE }, + { "cd", "cd", DISK | LOADABLE }, + { "racd", "racd", DISK | LOADABLE }, + { "cdr", "cd", DISK | LOADABLE }, + { "cdrw", "cd", DISK | LOADABLE }, + { "dvdrom", "cd", DISK | LOADABLE }, + { "dvd", "cd", DISK | LOADABLE }, + { "dvdr", "cd", DISK | LOADABLE }, + { "dvdrw","cd", DISK | LOADABLE }, + { "mcd", "mcd", DISK | LOADABLE }, /* XXX Is this true? */ + { "tape", "st", TAPE | NOTLOADABLE }, + { "st", "st", TAPE | NOTLOADABLE }, + { "dat", "st", TAPE | NOTLOADABLE }, + { "exabyte", "st", TAPE | NOTLOADABLE } }; #define MAXNICKLEN 12 /* at least enough room for the longest * nickname */
CVS commit: src/usr.bin/eject
Module Name:src Committed By: yamt Date: Wed Jun 23 18:07:59 UTC 2010 Modified Files: src/usr.bin/eject: am_glue.c am_glue.h eject.c Log Message: don't bother to connect to amd unless necessary. PR/42207 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/eject/am_glue.c cvs rdiff -u -r1.1 -r1.2 src/usr.bin/eject/am_glue.h cvs rdiff -u -r1.25 -r1.26 src/usr.bin/eject/eject.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/eject/am_glue.c diff -u src/usr.bin/eject/am_glue.c:1.3 src/usr.bin/eject/am_glue.c:1.4 --- src/usr.bin/eject/am_glue.c:1.3 Fri Feb 26 22:44:17 2010 +++ src/usr.bin/eject/am_glue.c Wed Jun 23 18:07:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: am_glue.c,v 1.3 2010/02/26 22:44:17 christos Exp $ */ +/* $NetBSD: am_glue.c,v 1.4 2010/06/23 18:07:59 yamt Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: am_glue.c,v 1.3 2010/02/26 22:44:17 christos Exp $"); +__RCSID("$NetBSD: am_glue.c,v 1.4 2010/06/23 18:07:59 yamt Exp $"); #endif /* not lint */ #ifdef HAVE_CONFIG_H @@ -39,6 +39,8 @@ #include #include +#include + #include "am_glue.h" static CLIENT *clnt; @@ -85,10 +87,15 @@ return rv; } -void +static void am_init(void) { static const char *server = "localhost"; + static bool called; + + if (called) + return; + called = true; if (ping_pmap() == -1) return; @@ -112,6 +119,8 @@ static struct timeval timeout = { ALLOWED_MOUNT_TIME, 0 }; amq_sync_umnt result; + am_init(); + if (clnt == NULL) return AMQ_UMNT_FAILED; Index: src/usr.bin/eject/am_glue.h diff -u src/usr.bin/eject/am_glue.h:1.1 src/usr.bin/eject/am_glue.h:1.2 --- src/usr.bin/eject/am_glue.h:1.1 Fri Jan 16 17:31:22 2009 +++ src/usr.bin/eject/am_glue.h Wed Jun 23 18:07:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: am_glue.h,v 1.1 2009/01/16 17:31:22 christos Exp $ */ +/* $NetBSD: am_glue.h,v 1.2 2010/06/23 18:07:59 yamt Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -28,9 +28,6 @@ #ifndef __AM_GLUE_H__ #define __AM_GLUE_H__ -#include - -void am_init(void); int am_unmount(const char *); #endif /* __AM_GLUE_H__ */ Index: src/usr.bin/eject/eject.c diff -u src/usr.bin/eject/eject.c:1.25 src/usr.bin/eject/eject.c:1.26 --- src/usr.bin/eject/eject.c:1.25 Fri Jan 16 17:31:22 2009 +++ src/usr.bin/eject/eject.c Wed Jun 23 18:07:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: eject.c,v 1.25 2009/01/16 17:31:22 christos Exp $ */ +/* $NetBSD: eject.c,v 1.26 2010/06/23 18:07:59 yamt Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #endif/* not lint */ #ifndef lint -__RCSID("$NetBSD: eject.c,v 1.25 2009/01/16 17:31:22 christos Exp $"); +__RCSID("$NetBSD: eject.c,v 1.26 2010/06/23 18:07:59 yamt Exp $"); #endif/* not lint */ #include @@ -332,9 +332,6 @@ int i, nmnts; const char *dn; -#ifdef AMD_SUPPORT - am_init(); -#endif nmnts = getmntinfo(&mounts, MNT_NOWAIT); if (nmnts == 0) err(1, "getmntinfo");
CVS commit: src/usr.bin/eject
Module Name:src Committed By: he Date: Sat Mar 28 12:19:51 UTC 2009 Modified Files: src/usr.bin/eject: Makefile Log Message: Don't include the AMD stuff if SMALLPROG is defined. Brings the size of the sparc INSTALL ramdisk image under control again. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/eject/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/eject/Makefile diff -u src/usr.bin/eject/Makefile:1.7 src/usr.bin/eject/Makefile:1.8 --- src/usr.bin/eject/Makefile:1.7 Mon Mar 23 04:00:44 2009 +++ src/usr.bin/eject/Makefile Sat Mar 28 12:19:51 2009 @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.7 2009/03/23 04:00:44 christos Exp $ +# $NetBSD: Makefile,v 1.8 2009/03/28 12:19:51 he Exp $ .include +.if !defined(SMALLPROG) AMD_SUPPORT?=yes +.endif PROG= eject SRCS= eject.c
CVS commit: src/usr.bin/eject
Module Name:src Committed By: christos Date: Mon Mar 23 04:00:45 UTC 2009 Modified Files: src/usr.bin/eject: Makefile Log Message: turn on amd support for eject now that we have it. From Anon Ymous To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/eject/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/eject/Makefile diff -u src/usr.bin/eject/Makefile:1.6 src/usr.bin/eject/Makefile:1.7 --- src/usr.bin/eject/Makefile:1.6 Wed Jan 21 08:13:26 2009 +++ src/usr.bin/eject/Makefile Mon Mar 23 00:00:44 2009 @@ -1,14 +1,16 @@ -# $NetBSD: Makefile,v 1.6 2009/01/21 13:13:26 christos Exp $ +# $NetBSD: Makefile,v 1.7 2009/03/23 04:00:44 christos Exp $ .include -AMD_SUPPORT?=no # XXX: Off since we don't have the sync umount patch in yet. +AMD_SUPPORT?=yes PROG= eject SRCS= eject.c .if ${AMD_SUPPORT:Uno} == "yes" -IDIST= ${NETBSDSRCDIR}/external/bsd/am-utils/dist +IDIST= ${NETBSDSRCDIR}/external/bsd/am-utils/dist +LIBAMUOBJDIR!= cd ${IDIST}/../lib/libamu && ${PRINTOBJDIR} + .PATH: ${IDIST}/libamu SRCS+= am_glue.c @@ -19,6 +21,8 @@ CPPFLAGS+= -I${IDIST} CPPFLAGS+= -I${IDIST}/libamu CPPFLAGS+= -I${IDIST}/include +CPPFLAGS+= -I${IDIST}/../include +CPPFLAGS+= -I${LIBAMUOBJDIR} .endif LDADD+= -lutil