summaryrefslogtreecommitdiff
path: root/nandtest.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-06-27 11:27:20 -0700
committerArtem Bityutskiy <dedekind1@gmail.com>2011-06-29 08:42:38 +0300
commit15f5f89995de6f10a5dc7b30ebf87d856c4e1127 (patch)
tree8eb845b328f07685164ce8b078cf74851e74fa2e /nandtest.c
parent6977ec0308678514ea4450e25e9d443a787da12e (diff)
mtd-utils: remove whitespace at end of lines
Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
Diffstat (limited to 'nandtest.c')
-rw-r--r--nandtest.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/nandtest.c b/nandtest.c
index 93f01ca..d03dc11 100644
--- a/nandtest.c
+++ b/nandtest.c
@@ -79,7 +79,7 @@ int erase_and_write(loff_t ofs, unsigned char *data, unsigned char *rbuf)
printf("\r%08x: reading...", (unsigned)ofs);
fflush(stdout);
-
+
len = pread(fd, rbuf, meminfo.erasesize, ofs);
if (len < meminfo.erasesize) {
printf("\n");
@@ -89,7 +89,7 @@ int erase_and_write(loff_t ofs, unsigned char *data, unsigned char *rbuf)
perror("read");
exit(1);
}
-
+
if (ioctl(fd, ECCGETSTATS, &newstats)) {
printf("\n");
perror("ECCGETSTATS");
@@ -184,7 +184,7 @@ int main(int argc, char **argv)
case 'l':
length = strtol(optarg, NULL, 0);
break;
-
+
}
}
if (argc - optind != 1)
@@ -195,7 +195,7 @@ int main(int argc, char **argv)
perror("open");
exit(1);
}
-
+
if (ioctl(fd, MEMGETINFO, &meminfo)) {
perror("MEMGETINFO");
close(fd);
@@ -206,20 +206,20 @@ int main(int argc, char **argv)
length = meminfo.size;
if (offset % meminfo.erasesize) {
- fprintf(stderr, "Offset %x not multiple of erase size %x\n",
+ fprintf(stderr, "Offset %x not multiple of erase size %x\n",
offset, meminfo.erasesize);
exit(1);
}
if (length % meminfo.erasesize) {
- fprintf(stderr, "Length %x not multiple of erase size %x\n",
+ fprintf(stderr, "Length %x not multiple of erase size %x\n",
length, meminfo.erasesize);
exit(1);
}
if (length + offset > meminfo.size) {
- fprintf(stderr, "Length %x + offset %x exceeds device size %x\n",
+ fprintf(stderr, "Length %x + offset %x exceeds device size %x\n",
length, offset, meminfo.size);
exit(1);
- }
+ }
wbuf = malloc(meminfo.erasesize * 3);
if (!wbuf) {