Lines Matching defs:btx
48 #include "btx.h"
51 #define BTX_PATH "/sys/boot/i386/btx"
91 BTX_PATH "/btx/btx"; /* BTX kernel */
203 struct btx_hdr btx, btxle;
223 getbtx(fdi[i], &btx);
236 ohdr.data = btx.btx_textsz + ihdr.size;
250 btx.btx_flags |= BTX_MAPONE;
254 btx.btx_pgctl -= cwr;
255 btx.btx_entry = Eflag ? centry : ihdr.entry;
271 btxle = btx;
276 copy(fdi[i], fdo, btx.btx_textsz - sizeof(btx),
277 sizeof(btx));
293 printf(binfo, btx.btx_majver, btx.btx_minver, btx.btx_textsz,
294 BTX_ORIGIN(btx), BTX_ENTRY(btx), BTX_MAPPED(btx) *
295 BTX_PGSIZE / 0x100000, !!(btx.btx_flags & BTX_MAPONE),
296 BTX_MAPPED(btx) - btx.btx_pgctl - BTX_PGBASE /
297 BTX_PGSIZE - BTX_MAPPED(btx) * 4 / BTX_PGSIZE);
309 getbtx(int fd, struct btx_hdr * btx)
311 if (readx(fd, btx, sizeof(*btx), 0) != sizeof(*btx) ||
312 btx->btx_magic[0] != BTX_MAG0 ||
313 btx->btx_magic[1] != BTX_MAG1 ||
314 btx->btx_magic[2] != BTX_MAG2)
316 btx->btx_pgctl = le16toh(btx->btx_pgctl);
317 btx->btx_textsz = le16toh(btx->btx_textsz);
318 btx->btx_entry = le32toh(btx->btx_entry);