Apply vodz' last_patch52
[oweals/busybox.git] / libbb / loop.c
index 4754b8da18e6a8c2b75437c3f3952014eba5e6d1..7e58b2f8510da5eb345aee23598c4ec0c2f0c1c1 100644 (file)
@@ -2,9 +2,7 @@
 /*
  * Utility routines.
  *
- * Copyright (C) tons of folks.  Tracking down who wrote what
- * isn't something I'm going to worry about...  If you wrote something
- * here, please feel free to acknowledge your work.
+ * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Based in part on code from sash, Copyright (c) 1999 by David I. Bell 
- * Permission has been granted to redistribute this code under the GPL.
- *
  */
 
 #include <stdio.h>
@@ -101,7 +95,7 @@ extern char *find_unused_loop_device(void)
        struct loop_info loopinfo;
 
        for (i = 0; i <= 7; i++) {
-               sprintf(dev, "/dev/loop%d", i);
+               sprintf(dev, LOOP_FORMAT, i);
                if (stat(dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) {
                        if ((fd = open(dev, O_RDONLY)) >= 0) {
                                if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) != 0) {