projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b93d4fa
)
BSD 4_1c_2 development
author
CSRG
<csrg@ucbvax.Berkeley.EDU>
Sun, 7 Nov 1982 13:02:12 +0000
(
05:02
-0800)
committer
CSRG
<csrg@ucbvax.Berkeley.EDU>
Sun, 7 Nov 1982 13:02:12 +0000
(
05:02
-0800)
Work on file usr/src/bin/hostid.c
Synthesized-from: CSRG/cd1/4.1c.2
usr/src/bin/hostid.c
[new file with mode: 0644]
patch
|
blob
diff --git a/usr/src/bin/hostid.c
b/usr/src/bin/hostid.c
new file mode 100644
(file)
index 0000000..
4a0a51e
--- /dev/null
+++ b/
usr/src/bin/hostid.c
@@ -0,0
+1,15
@@
+/* hostid.c 4.1 82/11/07 */
+
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+
+ if (argc > 1) {
+ int hostid;
+ sscanf(argv[1], "%x", &hostid);
+ if (sethostid(hostid) < 0)
+ perror("hostid");
+ } else
+ printf("%x\n", gethostid());
+}