Permalink
Browse files

updates gathered from V-Soft

  • Loading branch information...
trothr committed Dec 5, 2017
1 parent 82faf05 commit f46537e0b35c388a432cc16029482dc903fc9034
Showing with 43 additions and 36 deletions.
  1. +6 −0 cmsmake.cmsmake
  2. +2 −2 cmsmkcc.exec
  3. +10 −4 hello.c
  4. +2 −2 sleep.c
  5. +23 −28 uname.c
View
@@ -376,12 +376,18 @@ sleep.c:
sleep.o: sleep.c
$(CC) -c -o $@ $<
sleep.module: sleep.o
$(LD) -lsceelked -o $@ $<
uname.c:
wget -q $(BASEURL)/$@
uname.o: uname.c
$(CC) -c -o $@ $<
uname.module: uname.o
$(LD) -lsceelked -o $@ $<
trackv52.vmarc:
curl --binary -s http://vm.marist.edu/track/$@ \
View
@@ -12,8 +12,8 @@ opts = ""
list = "NOLIST"
link = 1
defs = ""
defs = "OPENVM=1"
opts = "LONGNAME"
/* defs = "OPENVM=1" */
/* opts = "LONGNAME" */
verbose = 0
/* parse command-line and options */
View
14 hello.c
@@ -24,10 +24,16 @@ int main()
(void) printf("CMS Make version %s\n",MAKE_VERSION);
(void) printf("OS=%s, REL=%s, HW=%s\n",
hellouts.sysname, hellouts.release,hellouts.machine);
(void) printf("VER='%s'\n",hellouts.version);
/* hellouts.nodename */
/*
rc = uname(&hellouts);
if (rc != 0) { (void) perror("uname()"); (void) exit(rc); return rc; }
*/
(void) printf(" sysname %s\n",hellouts.sysname);
(void) printf(" nodename %s\n",hellouts.nodename);
(void) printf(" OS release %s\n",hellouts.release);
(void) printf(" OS version %s\n",hellouts.version);
(void) printf(" machine %s\n",hellouts.machine);
return 0;
}
View
@@ -10,14 +10,14 @@
#include "cmsmake.h"
#include <unistd.h>
#include <stdlib.h>
int main(int argc,char*argv[])
{
static char *_eye_catcher = "CMS Make - sleep.c";
if (argc < 2) return 0;
sleep(atoi(argv[1]));
(void) sleep((unsigned int)atoi(argv[1]));
return 0;
}
View
51 uname.c
@@ -7,21 +7,26 @@
* *
* */
#include "cmsmake.h"
#include <unistd.h>
#include <sys/utsname.h>
#include <unistd.h>
#include "cmsmake.h"
/*
#define do_sysname 0x0001
#define do_nodename 0x0002
#define do_release 0x0004
#define do_version 0x0008
#define do_machine 0x0010
-s, --kernel-name
-n, --nodename
-r, --kernel-release
-v, --kernel-version
-m, --machine
#define do_domain 0x0020
-s, --kernel-name == sysname
-n, --nodename == nodename
-r, --kernel-release == release
-v, --kernel-version == version
-m, --machine == machine
--domainname (maybe)
--version == CMS Make version
*/
int main()
{
@@ -34,37 +39,27 @@ int main()
rc = uname(&hellouts);
if (rc != 0) { (void) perror("uname()"); (void) exit(rc); return rc; }
(void) printf("OS=%s, R=%s, V=%s, HW=%s\n",
hellouts.sysname, hellouts.release,
hellouts.version, hellouts.machine);
/* hellouts.nodename */
(void) printf("S=%s, N=%s, R=%s, V=%s, M=%s\n",
hellouts.sysname,
hellouts.nodename,
hellouts.release,
hellouts.version,
hellouts.machine
);
(void) exit(0);
/* (void) exit(0); */
return 0;
}
/*
-a, --all = except omit -p and -i
-s, --kernel-name
-n, --nodename
-r, --kernel-release
-v, --kernel-version
-m, --machine
-p, --processor
-i, --hardware-platform
-o, --operating-system
--help
--version
*/

0 comments on commit f46537e

Please sign in to comment.