aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 13:24:52 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 13:24:52 -0500
commit21511abd0a248a3f225d3b611cfabb93124605a7 (patch)
treeeb490f94322f3c76169ea7e5ec09524f275f390e /Documentation
parent39ce941ec15032c0efc3632b9f00a6b2365e1870 (diff)
parente1b0d4ba46b42909d11ea152a6b56ee76f062ca3 (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] make pfm_get_task work with virtual pids [IA64] honor notify_die() returning NOTIFY_STOP [IA64] remove dead code: __cpu_{down,die} from !HOTPLUG_CPU [IA64] Appoint kvm/ia64 Maintainers [IA64] ia64_set_psr should use srlz.i [IA64] Export three symbols for module use [IA64] mca style cleanup [IA64] sn_hwperf semaphore to mutex [IA64] generalize attribute of fsyscall_gtod_data [IA64] efi.c Add /* never reached */ annotation [IA64] efi.c Spelling/punctuation fixes [IA64] Make efi.c mostly fit in 80 columns [IA64] aliasing-test: fix gcc warnings on non-ia64 [IA64] Slim-down __clear_bit_unlock [IA64] Fix the order of atomic operations in restore_previous_kprobes on ia64 [IA64] constify function pointer tables [IA64] fix userspace compile error in gcc_intrin.h
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ia64/aliasing-test.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c
index 773a814d4093..d23610fb2ff9 100644
--- a/Documentation/ia64/aliasing-test.c
+++ b/Documentation/ia64/aliasing-test.c
@@ -16,6 +16,7 @@
16#include <fcntl.h> 16#include <fcntl.h>
17#include <fnmatch.h> 17#include <fnmatch.h>
18#include <string.h> 18#include <string.h>
19#include <sys/ioctl.h>
19#include <sys/mman.h> 20#include <sys/mman.h>
20#include <sys/stat.h> 21#include <sys/stat.h>
21#include <unistd.h> 22#include <unistd.h>
@@ -65,7 +66,7 @@ int scan_tree(char *path, char *file, off_t offset, size_t length, int touch)
65{ 66{
66 struct dirent **namelist; 67 struct dirent **namelist;
67 char *name, *path2; 68 char *name, *path2;
68 int i, n, r, rc, result = 0; 69 int i, n, r, rc = 0, result = 0;
69 struct stat buf; 70 struct stat buf;
70 71
71 n = scandir(path, &namelist, 0, alphasort); 72 n = scandir(path, &namelist, 0, alphasort);
@@ -113,7 +114,7 @@ skip:
113 free(namelist[i]); 114 free(namelist[i]);
114 } 115 }
115 free(namelist); 116 free(namelist);
116 return rc; 117 return result;
117} 118}
118 119
119char buf[1024]; 120char buf[1024];
@@ -149,7 +150,7 @@ int scan_rom(char *path, char *file)
149{ 150{
150 struct dirent **namelist; 151 struct dirent **namelist;
151 char *name, *path2; 152 char *name, *path2;
152 int i, n, r, rc, result = 0; 153 int i, n, r, rc = 0, result = 0;
153 struct stat buf; 154 struct stat buf;
154 155
155 n = scandir(path, &namelist, 0, alphasort); 156 n = scandir(path, &namelist, 0, alphasort);
@@ -180,7 +181,7 @@ int scan_rom(char *path, char *file)
180 * important thing is that no MCA happened. 181 * important thing is that no MCA happened.
181 */ 182 */
182 if (rc > 0) 183 if (rc > 0)
183 fprintf(stderr, "PASS: %s read %ld bytes\n", path2, rc); 184 fprintf(stderr, "PASS: %s read %d bytes\n", path2, rc);
184 else { 185 else {
185 fprintf(stderr, "PASS: %s not readable\n", path2); 186 fprintf(stderr, "PASS: %s not readable\n", path2);
186 return rc; 187 return rc;
@@ -201,10 +202,10 @@ skip:
201 free(namelist[i]); 202 free(namelist[i]);
202 } 203 }
203 free(namelist); 204 free(namelist);
204 return rc; 205 return result;
205} 206}
206 207
207int main() 208int main(void)
208{ 209{
209 int rc; 210 int rc;
210 211
@@ -256,4 +257,6 @@ int main()
256 scan_tree("/proc/bus/pci", "??.?", 0xA0000, 0x20000, 0); 257 scan_tree("/proc/bus/pci", "??.?", 0xA0000, 0x20000, 0);
257 scan_tree("/proc/bus/pci", "??.?", 0xC0000, 0x40000, 1); 258 scan_tree("/proc/bus/pci", "??.?", 0xC0000, 0x40000, 1);
258 scan_tree("/proc/bus/pci", "??.?", 0, 1024*1024, 0); 259 scan_tree("/proc/bus/pci", "??.?", 0, 1024*1024, 0);
260
261 return rc;
259} 262}