2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
11 # include <linux/fs.h>
13 # include <sys/ioctl.h>
19 int main(int argc
, char *argv
[])
26 printf("mkfsaffs v0.02\n");
30 printf("Usage: mkfsaffs <devname> <volname>\n");
37 fd
= open(argv
[1],O_RDONLY
);
40 printf("open failed\n");
43 if (ioctl(fd
,BLKGETSIZE
,&size
) < 0)
45 printf("Could not get size\n");
50 printf("OS not supported!\n");
53 hd
= adfCreateDumpDevice(argv
[1], size
, 1,1);
55 fprintf(stderr
, "can't mount device\n");
56 adfEnvCleanUp(); exit(1);
59 adfCreateHdFile( hd
, argv
[2], FSMASK_FFS
);
61 vol
= adfMount(hd
, 0, FALSE
);
64 fprintf(stderr
, "can't mount volume\n");
65 adfEnvCleanUp(); exit(1);