clang-format
This commit is contained in:
@@ -46,29 +46,24 @@
|
||||
#define POISON_BYTE 0xa9
|
||||
#define BLOCKSIZE 512
|
||||
|
||||
static
|
||||
void
|
||||
poison(void)
|
||||
{
|
||||
char buf[BLOCKSIZE];
|
||||
off_t sectors, i;
|
||||
static void poison(void) {
|
||||
char buf[BLOCKSIZE];
|
||||
off_t sectors, i;
|
||||
|
||||
memset(buf, POISON_BYTE, sizeof(buf));
|
||||
memset(buf, POISON_BYTE, sizeof(buf));
|
||||
|
||||
sectors = diskblocks();
|
||||
for (i=0; i<sectors; i++) {
|
||||
diskwrite(buf, i);
|
||||
}
|
||||
sectors = diskblocks();
|
||||
for (i = 0; i < sectors; i++) {
|
||||
diskwrite(buf, i);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
if (argc != 2) {
|
||||
errx(1, "Usage: %s disk-image", argv[0]);
|
||||
}
|
||||
opendisk(argv[1]);
|
||||
poison();
|
||||
closedisk();
|
||||
return 0;
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc != 2) {
|
||||
errx(1, "Usage: %s disk-image", argv[0]);
|
||||
}
|
||||
opendisk(argv[1]);
|
||||
poison();
|
||||
closedisk();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user