Lines Matching refs:wrec

93 static int wlog_rec_pack(struct wlog_rec *wrec, char *buf, int flag);
94 static int wlog_rec_unpack(struct wlog_rec *wrec, char *buf);
193 int wlog_record_write(struct wlog_file *wfile, struct wlog_rec *wrec, in wlog_record_write() argument
207 reclen = wlog_rec_pack(wrec, wbuf, (offset < 0)); in wlog_record_write()
268 struct wlog_rec wrec; in wlog_scan_backward() local
377 wlog_rec_unpack(&wrec, albuf); in wlog_scan_backward()
384 if ((rval = (*func) (&wrec, data)) == WLOG_STOP_SCAN) { in wlog_scan_backward()
405 static int wlog_rec_pack(struct wlog_rec *wrec, char *buf, int flag) in wlog_rec_pack() argument
412 wrecd->w_pid = (uint) wrec->w_pid; in wlog_rec_pack()
413 wrecd->w_offset = (uint) wrec->w_offset; in wlog_rec_pack()
414 wrecd->w_nbytes = (uint) wrec->w_nbytes; in wlog_rec_pack()
415 wrecd->w_oflags = (uint) wrec->w_oflags; in wlog_rec_pack()
416 wrecd->w_done = (uint) wrec->w_done; in wlog_rec_pack()
417 wrecd->w_async = (uint) wrec->w_async; in wlog_rec_pack()
419 wrecd->w_pathlen = (wrec->w_pathlen > 0) ? (uint) wrec->w_pathlen : 0; in wlog_rec_pack()
420 wrecd->w_hostlen = (wrec->w_hostlen > 0) ? (uint) wrec->w_hostlen : 0; in wlog_rec_pack()
422 (wrec->w_patternlen > 0) ? (uint) wrec->w_patternlen : 0; in wlog_rec_pack()
436 memcpy(file, wrec->w_path, wrecd->w_pathlen); in wlog_rec_pack()
439 memcpy(host, wrec->w_host, wrecd->w_hostlen); in wlog_rec_pack()
442 memcpy(pattern, wrec->w_pattern, wrecd->w_patternlen); in wlog_rec_pack()
452 static int wlog_rec_unpack(struct wlog_rec *wrec, char *buf) in wlog_rec_unpack() argument
457 memset((char *)wrec, 0x00, sizeof(struct wlog_rec)); in wlog_rec_unpack()
460 wrec->w_pid = wrecd->w_pid; in wlog_rec_unpack()
461 wrec->w_offset = wrecd->w_offset; in wlog_rec_unpack()
462 wrec->w_nbytes = wrecd->w_nbytes; in wlog_rec_unpack()
463 wrec->w_oflags = wrecd->w_oflags; in wlog_rec_unpack()
464 wrec->w_hostlen = wrecd->w_hostlen; in wlog_rec_unpack()
465 wrec->w_pathlen = wrecd->w_pathlen; in wlog_rec_unpack()
466 wrec->w_patternlen = wrecd->w_patternlen; in wlog_rec_unpack()
467 wrec->w_done = wrecd->w_done; in wlog_rec_unpack()
468 wrec->w_async = wrecd->w_async; in wlog_rec_unpack()
470 if (wrec->w_pathlen > 0) { in wlog_rec_unpack()
472 memcpy(wrec->w_path, file, wrec->w_pathlen); in wlog_rec_unpack()
475 if (wrec->w_hostlen > 0) { in wlog_rec_unpack()
476 host = buf + sizeof(struct wlog_rec_disk) + wrec->w_pathlen; in wlog_rec_unpack()
477 memcpy(wrec->w_host, host, wrec->w_hostlen); in wlog_rec_unpack()
480 if (wrec->w_patternlen > 0) { in wlog_rec_unpack()
482 wrec->w_pathlen + wrec->w_hostlen; in wlog_rec_unpack()
483 memcpy(wrec->w_pattern, pattern, wrec->w_patternlen); in wlog_rec_unpack()