summaryrefslogtreecommitdiff
path: root/usr/src/cmd/fdetach
diff options
context:
space:
mode:
authormuffin <none@none>2005-08-10 19:30:11 -0700
committermuffin <none@none>2005-08-10 19:30:11 -0700
commitb390fe2cba75806c96e503c6b93335182cd98efd (patch)
treea464e705626c08ec80ffe1eab30bdd1ababf8ea8 /usr/src/cmd/fdetach
parent34e485807cef99a975f8962a04f4b7d1aa3529fe (diff)
downloadillumos-joyent-b390fe2cba75806c96e503c6b93335182cd98efd.tar.gz
6268979 cmd/bc and gcc don't get along
6269742 gcc and cmd/face don't get along 6269769 gcc and cmd/dc don't get along 6271043 gcc and cmd/fdetach don't get along 6271079 gcc and cmd/fmtmsg don't get along 6271158 gcc and cmd/graph don't get along 6273883 gcc and cmd/spline don't get along 6273936 gcc and cmd/tplot don't get along
Diffstat (limited to 'usr/src/cmd/fdetach')
-rw-r--r--usr/src/cmd/fdetach/fdetach.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/usr/src/cmd/fdetach/fdetach.c b/usr/src/cmd/fdetach/fdetach.c
index c1fd0756ac..c18138ea5b 100644
--- a/usr/src/cmd/fdetach/fdetach.c
+++ b/usr/src/cmd/fdetach/fdetach.c
@@ -19,30 +19,37 @@
*
* CDDL HEADER END
*/
+
+/*
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+#pragma ident "%Z%%M% %I% %E% SMI"
-#ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <errno.h>
+#include <stdlib.h>
+#include <stropts.h>
+
/*
* Unmount a STREAM from the command line.
*/
-main(argc, argv)
- int argc;
- char **argv;
+/* ARGSUSED */
+int
+main(int argc, char **argv)
{
- if (argv[1] == NULL)
- {
- printf("usage: fdetach pathname\n");
+ if (argv[1] == NULL) {
+ (void) printf("usage: fdetach pathname\n");
exit(-1);
}
- if (fdetach(argv[1]) < 0)
- {
+ if (fdetach(argv[1]) < 0) {
perror("fdetach");
exit(-1);
}
- exit(0);
+ return (0);
}