Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#8990 - Request additions to klibc-extras

Attached to Project: Arch Linux
Opened by Michael Towers (gradgrind) - Friday, 21 December 2007, 05:40 GMT
Last edited by eliott (cactus) - Thursday, 08 May 2008, 06:27 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

phrakture?

Any chance of adding a couple of things to the initramfs environment?

1) A simple 'mv', or at least a 'rename' (trivial to code).

2) A detach option for losetup (not sure how difficult this is to code, I haven't found any info on the ioctls needed here).
This task depends upon

Closed by  eliott (cactus)
Thursday, 08 May 2008, 06:27 GMT
Reason for closing:  Implemented
Additional comments about closing:  sounds resolved.
closing ticket.
Comment by Michael Towers (gradgrind) - Friday, 21 December 2007, 13:35 GMT
Here's a suggestion for (2), a 'lodel' application:

// lodel.c

/* Adapted from 'mount/lomount.c', function 'del_loop' in util-linux-ng-2.13.0.1 */

#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <string.h>
#include <linux/loop.h>

int main(int argc, const char ** argv)
{
int fd = -1;

if (argc != 2)
{
fprintf(stderr, "Usage: lodel <loop device>\n");
return 1;
}

if ((fd = open (argv[1], O_RDONLY)) < 0)
{
int errsv = errno;
fprintf(stderr, "loop: can't delete device %s: %s\n",
argv[1], strerror (errsv));
return 1;
}

if (ioctl (fd, LOOP_CLR_FD, 0) < 0)
{
perror ("ioctl: LOOP_CLR_FD");
close(fd);
return 1;
}
close (fd);
return 0;
}
Comment by Aaron Griffin (phrakture) - Friday, 11 January 2008, 20:17 GMT
Added 'mv' and 'lodel' utilities to git. Mind checking to see if this is acceptable?
http://projects.archlinux.org/git/?p=klibc-extras.git;a=summary
Comment by Michael Towers (gradgrind) - Saturday, 12 January 2008, 07:45 GMT
Looks fine to me (though might it be better to name the 'mv' something like 'rename', so that one doesn't expect too much of it?)

Loading...