cwdtest - kprintf("\nCWD: %s\nERR:...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * Here we test allocation of PID and their release */ #include <syscall.h> #include <kern/limits.h> #include <types.h> #include <lib.h> int cwdtest(int nargs, char **args) { (void)nargs; (void)args; kprintf("Test Start.\n"); char *name = (char*)kmalloc(PATH_MAX*sizeof(char)); int err; err = sys___getcwd(name, PATH_MAX);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: kprintf(&quot;\nCWD: %s\nERR: %d\n&quot;, name, err); int retval; err = sys_chdir(&quot;/bin&quot;, &amp;retval); kprintf(&quot;\nCHDIR /bin RET: %d, ERR: %d\n&quot;, retval, err); err = sys___getcwd(name, PATH_MAX); kprintf(&quot;\nCWD: %s\nERR: %d\n&quot;, name, err); kprintf(&quot;Test End.\n&quot;); return 0; }...
View Full Document

This note was uploaded on 11/10/2009 for the course CS 536 taught by Professor Lums during the Spring '09 term at Indiana.

Ask a homework question - tutors are online