home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / unixlib / !UnixLib / src / unix / c / chdir < prev    next >
Encoding:
Text File  |  1994-09-30  |  375 b   |  26 lines

  1. static char sccs_id[] = "@(#) chdir.c 1.2 " __DATE__ " HJR";
  2.  
  3. /* chdir.c (c) Copyright 1990 H.Rogers */
  4.  
  5. #include <errno.h>
  6.  
  7. #include "sys/types.h"
  8. #include "sys/unix.h"
  9. #include "sys/os.h"
  10.  
  11. int
  12. chdir (register char *path)
  13. {
  14.   os_error *e;
  15.  
  16.   path = __uname (path, 0);
  17.  
  18.   if (e = os_fsctrl (0, path, 0, 0))
  19.     {
  20.       __seterr (e);
  21.       return (-1);
  22.     }
  23.  
  24.   return (0);
  25. }
  26.