mirror of
https://github.com/pygos/pkg-utils.git
synced 2024-11-22 04:49:46 +01:00
Remove squashfs pseudo file listing generator
We no longer need this, since we can now produce our own squashfs images directly from package files. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
ed6841ed17
commit
5df2d5f730
4 changed files with 2 additions and 50 deletions
|
@ -31,7 +31,6 @@ typedef struct image_entry_t {
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
TOC_FORMAT_PRETTY = 0,
|
TOC_FORMAT_PRETTY = 0,
|
||||||
TOC_FORMAT_SQFS = 1,
|
|
||||||
TOC_FORMAT_INITRD = 2,
|
TOC_FORMAT_INITRD = 2,
|
||||||
TOC_FORMAT_PKG = 3,
|
TOC_FORMAT_PKG = 3,
|
||||||
} TOC_FORMAT;
|
} TOC_FORMAT;
|
||||||
|
|
|
@ -55,40 +55,6 @@ fail_type:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int print_sqfs(image_entry_t *ent, const char *root)
|
|
||||||
{
|
|
||||||
mode_t mode = ent->mode & (~S_IFMT);
|
|
||||||
(void)root;
|
|
||||||
|
|
||||||
switch (ent->mode & S_IFMT) {
|
|
||||||
case S_IFCHR:
|
|
||||||
printf("%s c %o %u %u %u %u\n", ent->name, mode,
|
|
||||||
(unsigned int)ent->uid, (unsigned int)ent->gid,
|
|
||||||
major(ent->data.device.devno),
|
|
||||||
minor(ent->data.device.devno));
|
|
||||||
break;
|
|
||||||
case S_IFBLK:
|
|
||||||
printf("%s b %o %u %u %u %u\n", ent->name, mode,
|
|
||||||
(unsigned int)ent->uid, (unsigned int)ent->gid,
|
|
||||||
major(ent->data.device.devno),
|
|
||||||
minor(ent->data.device.devno));
|
|
||||||
break;
|
|
||||||
case S_IFLNK:
|
|
||||||
mode = 0777;
|
|
||||||
/* fall-through */
|
|
||||||
case S_IFDIR:
|
|
||||||
case S_IFREG:
|
|
||||||
printf("%s m %o %u %u\n", ent->name, mode,
|
|
||||||
(unsigned int)ent->uid, (unsigned int)ent->gid);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
fputs("unknown file type in table of contents\n", stderr);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int print_initrd(image_entry_t *ent, const char *root)
|
static int print_initrd(image_entry_t *ent, const char *root)
|
||||||
{
|
{
|
||||||
mode_t mode = ent->mode & (~S_IFMT);
|
mode_t mode = ent->mode & (~S_IFMT);
|
||||||
|
@ -186,7 +152,6 @@ static int print_pkg(image_entry_t *ent, const char *root)
|
||||||
|
|
||||||
static print_fun_t printers[] = {
|
static print_fun_t printers[] = {
|
||||||
[TOC_FORMAT_PRETTY] = print_pretty,
|
[TOC_FORMAT_PRETTY] = print_pretty,
|
||||||
[TOC_FORMAT_SQFS] = print_sqfs,
|
|
||||||
[TOC_FORMAT_INITRD] = print_initrd,
|
[TOC_FORMAT_INITRD] = print_initrd,
|
||||||
[TOC_FORMAT_PKG] = print_pkg,
|
[TOC_FORMAT_PKG] = print_pkg,
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,9 +27,7 @@ static int cmd_dump(int argc, char **argv)
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 'l':
|
case 'l':
|
||||||
flags |= DUMP_TOC;
|
flags |= DUMP_TOC;
|
||||||
if (strcmp(optarg, "sqfs") == 0) {
|
if (strcmp(optarg, "initrd") == 0) {
|
||||||
format = TOC_FORMAT_SQFS;
|
|
||||||
} else if (strcmp(optarg, "initrd") == 0) {
|
|
||||||
format = TOC_FORMAT_INITRD;
|
format = TOC_FORMAT_INITRD;
|
||||||
} else if (strcmp(optarg, "pkg") == 0) {
|
} else if (strcmp(optarg, "pkg") == 0) {
|
||||||
format = TOC_FORMAT_PKG;
|
format = TOC_FORMAT_PKG;
|
||||||
|
@ -108,10 +106,6 @@ static command_t dump = {
|
||||||
" If \"detail\" is specified, a human readable,\n"
|
" If \"detail\" is specified, a human readable,\n"
|
||||||
" pretty printed format with details is used.\n"
|
" pretty printed format with details is used.\n"
|
||||||
"\n"
|
"\n"
|
||||||
" If \"sqfs\" is specified, a squashfs pseudo\n"
|
|
||||||
" file is genareated for setting permissions\n"
|
|
||||||
" bits and ownership appropriately.\n"
|
|
||||||
"\n"
|
|
||||||
" If \"initrd\" is specified, the format of\n"
|
" If \"initrd\" is specified, the format of\n"
|
||||||
" Linux gen_init_cpio is produced.\n"
|
" Linux gen_init_cpio is produced.\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
|
@ -118,9 +118,7 @@ static int cmd_install(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
mode = INSTALL_MODE_LIST_FILES;
|
mode = INSTALL_MODE_LIST_FILES;
|
||||||
if (strcmp(optarg, "sqfs") == 0) {
|
if (strcmp(optarg, "initrd") == 0) {
|
||||||
format = TOC_FORMAT_SQFS;
|
|
||||||
} else if (strcmp(optarg, "initrd") == 0) {
|
|
||||||
format = TOC_FORMAT_INITRD;
|
format = TOC_FORMAT_INITRD;
|
||||||
} else if (strcmp(optarg, "pkg") == 0) {
|
} else if (strcmp(optarg, "pkg") == 0) {
|
||||||
format = TOC_FORMAT_PKG;
|
format = TOC_FORMAT_PKG;
|
||||||
|
@ -252,10 +250,6 @@ static command_t install = {
|
||||||
" If \"detail\" is specified, a human readable,\n"
|
" If \"detail\" is specified, a human readable,\n"
|
||||||
" pretty printed format with details is used.\n"
|
" pretty printed format with details is used.\n"
|
||||||
"\n"
|
"\n"
|
||||||
" If \"sqfs\" is specified, a squashfs pseudo\n"
|
|
||||||
" file is genareated for setting permissions bits\n"
|
|
||||||
" and ownership appropriately.\n"
|
|
||||||
"\n"
|
|
||||||
" If \"initrd\" is specified, the format of Linux\n"
|
" If \"initrd\" is specified, the format of Linux\n"
|
||||||
" gen_init_cpio is produced.\n",
|
" gen_init_cpio is produced.\n",
|
||||||
.run_cmd = cmd_install,
|
.run_cmd = cmd_install,
|
||||||
|
|
Loading…
Reference in a new issue