[comp.os.minix] This fix to pwd.c just came in

ast@cs.vu.nl (Andy Tanenbaum) (07/15/88)

*** pwd.c	Wed Jul 13 13:11:11 1988
--- newpwd.c	Thu Jul 14 22:06:44 1988
***************
*** 10,16 ****
  	register char *n;
  	char name[128];
  	char *last_index();
! 	struct stat s, st;
  	struct direct d;
  
  	*name = 0;
--- 10,16 ----
  	register char *n;
  	char name[128];
  	char *last_index();
! 	struct stat s, st, sk;
  	struct direct d;
  
  	*name = 0;
***************
*** 46,53 ****
  					prints("Can't read ..\n");
  					exit(1);
  				}
! 				stat(d.d_name, &s);
! 			} while ((s.st_dev != st.st_dev) || (s.st_ino != st.st_ino));
  		close(fd);
  		if (strcmp(".",d.d_name)) {
  			strcat(name,"/");
--- 46,53 ----
  					prints("Can't read ..\n");
  					exit(1);
  				}
! 				stat(d.d_name, &sk);
! 			} while ((sk.st_dev != st.st_dev) || (sk.st_ino != st.st_ino));
  		close(fd);
  		if (strcmp(".",d.d_name)) {
  			strcat(name,"/");