quot.c (b728350ee67c01f96c3c5121774536fee81ad176) | quot.c (18b51f792fb28f3909a1e3a6b44898572b9afdcf) |
---|---|
1/* 2 * Copyright (C) 1991, 1994 Wolfgang Solfrank. 3 * Copyright (C) 1991, 1994 TooLs GmbH. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 463 unchanged lines hidden (view full) --- 472 473static void 474donames(fd, super, name) 475 int fd; 476 struct fs *super; 477 char *name; 478{ 479 int c; | 1/* 2 * Copyright (C) 1991, 1994 Wolfgang Solfrank. 3 * Copyright (C) 1991, 1994 TooLs GmbH. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 463 unchanged lines hidden (view full) --- 472 473static void 474donames(fd, super, name) 475 int fd; 476 struct fs *super; 477 char *name; 478{ 479 int c; |
480 ino_t inode, inode1; | 480 ino_t inode; |
481 ino_t maxino; 482 union dinode *dp; 483 484 maxino = super->fs_ncg * super->fs_ipg - 1; 485 /* first skip the name of the filesystem */ 486 while ((c = getchar()) != EOF && (c < '0' || c > '9')) 487 while ((c = getchar()) != EOF && c != '\n'); 488 ungetc(c,stdin); | 481 ino_t maxino; 482 union dinode *dp; 483 484 maxino = super->fs_ncg * super->fs_ipg - 1; 485 /* first skip the name of the filesystem */ 486 while ((c = getchar()) != EOF && (c < '0' || c > '9')) 487 while ((c = getchar()) != EOF && c != '\n'); 488 ungetc(c,stdin); |
489 inode1 = -1; | |
490 while (scanf("%u",&inode) == 1) { 491 if (inode > maxino) { 492 warnx("illegal inode %d",inode); 493 return; 494 } 495 errno = 0; 496 if ((dp = get_inode(fd,super,inode)) 497 && !isfree(super, dp)) { 498 printf("%s\t",user(DIP(super, dp, di_uid))->name); 499 /* now skip whitespace */ 500 while ((c = getchar()) == ' ' || c == '\t'); 501 /* and print out the remainder of the input line */ 502 while (c != EOF && c != '\n') { 503 putchar(c); 504 c = getchar(); 505 } 506 putchar('\n'); | 489 while (scanf("%u",&inode) == 1) { 490 if (inode > maxino) { 491 warnx("illegal inode %d",inode); 492 return; 493 } 494 errno = 0; 495 if ((dp = get_inode(fd,super,inode)) 496 && !isfree(super, dp)) { 497 printf("%s\t",user(DIP(super, dp, di_uid))->name); 498 /* now skip whitespace */ 499 while ((c = getchar()) == ' ' || c == '\t'); 500 /* and print out the remainder of the input line */ 501 while (c != EOF && c != '\n') { 502 putchar(c); 503 c = getchar(); 504 } 505 putchar('\n'); |
507 inode1 = inode; | |
508 } else { 509 if (errno) { 510 err(1, "%s", name); 511 } 512 /* skip this line */ 513 while ((c = getchar()) != EOF && c != '\n'); 514 } 515 if (c == EOF) --- 135 unchanged lines hidden --- | 506 } else { 507 if (errno) { 508 err(1, "%s", name); 509 } 510 /* skip this line */ 511 while ((c = getchar()) != EOF && c != '\n'); 512 } 513 if (c == EOF) --- 135 unchanged lines hidden --- |