Mercurial > hvf > hvf-old
changeset 479:6ebb4657b898
installer: there are some special files - install them
Some files that are installed are supposed to be also in specific locations.
For example, the ECKD IPL record & the ECKD loader.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Fri, 15 Apr 2011 21:06:56 -0400 |
parents | bf0ceeaf8532 |
children | aba2ded209f4 |
files | installer/cpio.c |
diffstat | 1 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/installer/cpio.c Thu Apr 14 12:26:53 2011 -0400 +++ b/installer/cpio.c Fri Apr 15 21:06:56 2011 -0400 @@ -26,20 +26,22 @@ char ft[8]; int lrecl; int text; + u32 lba; /* 0 means undef */ }; static struct table table[] = { - {"hvf.directory", "HVF ", "DIRECT ", 80, 1}, - {"hvf.config", "SYSTEM ", "CONFIG ", 80, 1}, -// {"hvf", "HVF ", "ELF ", 4096, 0}, - {"eckd.rto", "ECKDLOAD", "BIN ", 4096, 0}, - {"loader.rto", "DASDLOAD", "BIN ", 4096, 0}, - {"installed_files.txt", "HVF ", "TEXT ", 80, 1}, - {"", "" , "" , -1, -1}, + {"hvf.directory", "HVF ", "DIRECT ", 80, 1, 0}, + {"hvf.config", "SYSTEM ", "CONFIG ", 80, 1, 0}, +// {"hvf", "HVF ", "ELF ", 4096, 0, 0}, + {"eckd.rto", "ECKDLOAD", "BIN ", 4096, 0, 1}, + {"loader.rto", "DASDLOAD", "BIN ", 4096, 0, 2}, + {"installed_files.txt", "HVF ", "TEXT ", 80, 1, 0}, + {"", "" , "" , -1, -1, 0}, }; static void save_file(struct table *te, int filesize, u8 *buf) { + char pbuf[100]; struct FST fst; int ret; int rec; @@ -64,8 +66,16 @@ if (te->text) ascii2ebcdic(buf, filesize); + if (te->lba) { + if (filesize > te->lrecl) + die(); + snprintf(pbuf, 100, "special file, writing copy of data to LBA %d\n", + te->lba); + wto(pbuf); + write_blk(buf, te->lba); + } + for(rec=0; rec<(filesize/te->lrecl); rec++) { - char pbuf[100]; snprintf(pbuf, 100, "rec %03x at %p\n", rec, buf + (rec * te->lrecl)); wto(pbuf);