home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- *
- * $Source: /unixb/home/unixlib/source/unixlib37/src/unix/c/RCS/chdir,v $
- * $Date: 1996/10/30 21:59:01 $
- * $Revision: 1.2 $
- * $State: Rel $
- * $Author: unixlib $
- *
- * $Log: chdir,v $
- * Revision 1.2 1996/10/30 21:59:01 unixlib
- * Massive changes made by Nick Burret and Peter Burwood.
- *
- * Revision 1.1 1996/04/19 21:35:27 simon
- * Initial revision
- *
- ***************************************************************************/
-
- static const char rcs_id[] = "$Id: chdir,v 1.2 1996/10/30 21:59:01 unixlib Rel $";
-
- #include <errno.h>
-
- #include <unistd.h>
- #include <sys/os.h>
-
- int
- chdir (const char *path)
- {
- _kernel_oserror *e;
- char *p;
-
- p = __uname ((char *)path, 0);
-
- if (e = os_fsctrl (0, p, 0, 0))
- {
- __seterr (e);
- return (-1);
- }
-
- return (0);
- }
-