Commit Graph

3 Commits

Author SHA1 Message Date
Eric Andersen
25f95dee2d Lars Ekman writes:
When using "losetup" the device is always setup as Read-Only.

(I have only tested with the -o flag, but looking at the code the
 problem seems general)

The problem is the "opt" variable in "losetup.c" that is reused in
the "set_loop()" call. Clear it before the call and everything is OK;

  opt = 0;         /* <-------- added line */
  if (delete)
    return del_loop (argv[optind]) ? EXIT_SUCCESS : EXIT_FAILURE;
  else
    return set_loop (argv[optind], argv[optind + 1], offset, &opt)
      ? EXIT_FAILURE : EXIT_SUCCESS;
}

Best Regards,
Lars Ekman
2003-07-30 08:55:59 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Matt Kraai
83788da250 * include/applets.h (CONFIG_LOSETUP): New.
* include/usage.h (losetup_trivial_usage, losetup_full_usage): New.
* util-linux/Makefile: Add losetup.o.
* util-linux/config.in: Add losetup prompt.
* util-linux/losetup.c: New.
2002-03-20 17:38:37 +00:00