Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83313
b: refs/heads/master
c: cdef24c
h: refs/heads/master
i:
  83311: 4c7ddd6
v: v3
  • Loading branch information
Randy Dunlap authored and Tony Luck committed Feb 4, 2008
1 parent 3aba4c8 commit 9d0425c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5302ac5019367470e123cb91844a28d6941e6912
refs/heads/master: cdef24c9cd38ae236065409c4a6289f165639e55
15 changes: 9 additions & 6 deletions trunk/Documentation/ia64/aliasing-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <fcntl.h>
#include <fnmatch.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
Expand Down Expand Up @@ -65,7 +66,7 @@ int scan_tree(char *path, char *file, off_t offset, size_t length, int touch)
{
struct dirent **namelist;
char *name, *path2;
int i, n, r, rc, result = 0;
int i, n, r, rc = 0, result = 0;
struct stat buf;

n = scandir(path, &namelist, 0, alphasort);
Expand Down Expand Up @@ -113,7 +114,7 @@ int scan_tree(char *path, char *file, off_t offset, size_t length, int touch)
free(namelist[i]);
}
free(namelist);
return rc;
return result;
}

char buf[1024];
Expand Down Expand Up @@ -149,7 +150,7 @@ int scan_rom(char *path, char *file)
{
struct dirent **namelist;
char *name, *path2;
int i, n, r, rc, result = 0;
int i, n, r, rc = 0, result = 0;
struct stat buf;

n = scandir(path, &namelist, 0, alphasort);
Expand Down Expand Up @@ -180,7 +181,7 @@ int scan_rom(char *path, char *file)
* important thing is that no MCA happened.
*/
if (rc > 0)
fprintf(stderr, "PASS: %s read %ld bytes\n", path2, rc);
fprintf(stderr, "PASS: %s read %d bytes\n", path2, rc);
else {
fprintf(stderr, "PASS: %s not readable\n", path2);
return rc;
Expand All @@ -201,10 +202,10 @@ int scan_rom(char *path, char *file)
free(namelist[i]);
}
free(namelist);
return rc;
return result;
}

int main()
int main(void)
{
int rc;

Expand Down Expand Up @@ -256,4 +257,6 @@ int main()
scan_tree("/proc/bus/pci", "??.?", 0xA0000, 0x20000, 0);
scan_tree("/proc/bus/pci", "??.?", 0xC0000, 0x40000, 1);
scan_tree("/proc/bus/pci", "??.?", 0, 1024*1024, 0);

return rc;
}

0 comments on commit 9d0425c

Please sign in to comment.