- fp = fopen(mtd, "w");
- fprintf(stderr, "%s - marking with 0x4f575254\n", mtd);
- if (!fp) {
- fprintf(stderr, "opening %s failed\n", mtd);
+ fd = open(v->blk, O_WRONLY);
+ fprintf(stderr, "%s - marking with 0x%08x\n", v->blk, owrt);
+ if (fd < 0) {
+ fprintf(stderr, "opening %s failed\n", v->blk);