Ejemplo n.º 1
0
/*ARGSUSED*/
int
stobjmed_highlight(WINDOW *win, node_t *current, node_t *list)
{
    static char txt[256];
    char uuidstr[UUID_STR_LEN + 1];
    data_t *d;
    invt_mediafile_t *stobjmed;

    if(current == NULL || current->data == NULL) {
	return 0;
    }
    d = (data_t *)(current->data);
    stobjmed = (invt_mediafile_t *)(stobj_file[d->file_idx].data[d->data_idx]);

    wclear(infowin);

    put_info_header("session media file");

    uuid_unparse(stobjmed->mf_moid, uuidstr);
    snprintf(txt, sizeof(txt), "flags: %#x, id: %s", stobjmed->mf_flag, uuidstr);
    put_info_line(1, txt);

    snprintf(txt, sizeof(txt), "start ino: %llu, offset %lld",
	    (unsigned long long) stobjmed->mf_startino.ino,
	    (long long) stobjmed->mf_startino.offset);
    put_info_line(2, txt);

    snprintf(txt, sizeof(txt), "  end ino: %llu, offset %lld",
	    (unsigned long long) stobjmed->mf_endino.ino,
	    (long long) stobjmed->mf_endino.offset);
    put_info_line(3, txt);

    return FALSE;
}
Ejemplo n.º 2
0
/*ARGSUSED*/
int
stobjstrm_highlight(WINDOW *win, node_t *current, node_t *list)
{
    static char txt[256];
    data_t *d;
    invt_stream_t *stobjstrm;

    if(current == NULL || current->data == NULL) {
	return 0;
    }
    d = (data_t *)(current->data);
    stobjstrm = (invt_stream_t *)(stobj_file[d->file_idx].data[d->data_idx]);

    wclear(infowin);

    put_info_header("session stream");

    snprintf(txt, sizeof(txt), "interrupted: %s, cmdarg: %s",
	    (stobjstrm->st_interrupted == BOOL_TRUE) ? "yes" : "no",
	    stobjstrm->st_cmdarg);
    put_info_line(1, txt);

    snprintf(txt, sizeof(txt), "start ino: %llu, offset %lld",
	    (unsigned long long) stobjstrm->st_startino.ino,
	    (long long) stobjstrm->st_startino.offset);
    put_info_line(2, txt);

    snprintf(txt, sizeof(txt), "  end ino: %llu, offset %lld",
	    (unsigned long long) stobjstrm->st_endino.ino,
	    (long long) stobjstrm->st_endino.offset);
    put_info_line(3, txt);

    return FALSE;
}
Ejemplo n.º 3
0
Archivo: cmenu.c Proyecto: jkkm/xfsdump
/*ARGSUSED*/
int
menu_unhighlight(WINDOW *win, node_t *current, node_t *list)
{
    wclear(infowin);
    put_info_header("");
    return BOOL_FALSE;
}
Ejemplo n.º 4
0
/*ARGSUSED*/
int
stobjsess_highlight(WINDOW *win, node_t *current, node_t *list)
{
    static char txt[256];
    char uuidstr[UUID_STR_LEN + 1];
    data_t *d;
    invt_seshdr_t *stobjhdr;
    invt_session_t *stobjses;

    if(current == NULL || current->data == NULL) {
	return 0;
    }
    d = (data_t *)(current->data);
    stobjhdr = ((stobjsess_t *)(stobj_file[d->file_idx].data[d->data_idx]))->header;
    stobjses = ((stobjsess_t *)(stobj_file[d->file_idx].data[d->data_idx]))->session;

    wclear(infowin);

    put_info_header("session entry");

    snprintf(txt, sizeof(txt), "pruned:  %s, flags: %#x, time: %s",
	    (stobjhdr->sh_pruned == BOOL_TRUE) ? "yes" : "no",
	    stobjhdr->sh_flag,
	    ctime32(&(stobjhdr->sh_time)));
    txt[strlen(txt)-1] = '\0';
    put_info_line(1, txt);

    uuid_unparse(stobjses->s_fsid, uuidstr);
    snprintf(txt, sizeof(txt), "mountpt: %s, fsid: %s", stobjses->s_mountpt, uuidstr);
    put_info_line(2, txt);

    uuid_unparse(stobjses->s_sesid, uuidstr);
    snprintf(txt, sizeof(txt), "device:  %s, sesid: %s", stobjses->s_devpath, uuidstr);
    put_info_line(3, txt);

    return FALSE;
}