Eventually reporting boot info with TOC of -indev, redirected drive aquiration TOC to info channel

This commit is contained in:
2008-10-25 12:34:36 +00:00
parent e76340d4f3
commit 3b14ee2117
5 changed files with 226 additions and 22 deletions

View File

@ -2120,6 +2120,8 @@ struct FindjoB {
int damage_filter; /* -1=only undamaged , 0=all , 1=only damaged */
int commit_filter; /* bit0= test -pending_data : uncommitted regular files */
void *wanted_node; /* if not NULL, then only this node address matches */
/* 0= echo
1= rm (also rmdir)
2= rm_r
@ -2143,6 +2145,7 @@ struct FindjoB {
20= is_full_in_iso iso_rr_equiv
21= report_damage
22= report_lba
23= internal:memorize path of last matching node in found_path
*/
int action;
char *target;
@ -2151,11 +2154,10 @@ struct FindjoB {
mode_t mode_and, mode_or;
int type; /* see Xorriso_set_time flag */
time_t date;
char *found_path;
struct FindjoB *subjob;
};
int Findjob_destroy(struct FindjoB **job, int flag);
int Findjob_new(struct FindjoB **o, char *start_path, int flag)
{
@ -2171,16 +2173,18 @@ int Findjob_new(struct FindjoB **o, char *start_path, int flag)
m->end_lba= -1;
m->damage_filter= 0;
m->commit_filter= 0;
m->wanted_node= NULL;
m->action= 0; /* print */
m->target= NULL; /* a mere pointer, not managed memory */
m->user= 0;
m->group= 0;
m->type= 0;
m->date= 0;
m->subjob= NULL;
m->start_path= strdup(start_path);
if(m->start_path==NULL)
goto failed;
m->found_path= NULL;
m->subjob= NULL;
return(1);
failed:;
Findjob_destroy(o, 0);
@ -2311,6 +2315,41 @@ int Findjob_get_commit_filter(struct FindjoB *o, int *commit_filter, int flag)
}
int Findjob_set_wanted_node(struct FindjoB *o, void *wanted_node, int flag)
{
o->wanted_node= wanted_node;
return(1);
}
int Findjob_get_wanted_node(struct FindjoB *o, void **wanted_node, int flag)
{
*wanted_node= o->wanted_node;
return(1);
}
int Findjob_set_found_path(struct FindjoB *o, char *path, int flag)
{
if(o->found_path != NULL)
free(o->found_path);
if(path != NULL) {
o->found_path= strdup(path);
if(o->found_path == NULL)
return(-1);
} else
o->found_path= NULL;
return(1);
}
int Findjob_get_found_path(struct FindjoB *o, char **path, int flag)
{
*path= o->found_path;
return(1);
}
/* @flag bit0=recognize type "e" = El-Torito
@return 0=no match , 1=match , <0 = error
*/
@ -2504,6 +2543,14 @@ int Findjob_set_action_subjob(struct FindjoB *o, int action,
}
int Findjob_set_action_found_path(struct FindjoB *o, int flag)
{
o->action= 23;
Findjob_set_found_path(o, NULL, 0);
return(1);
}
/* ---------------------------- SplitparT ------------------------- */
@ -3158,8 +3205,6 @@ struct SectorbitmaP {
int map_size;
};
int Sectorbitmap_destroy(struct SectorbitmaP **o, int flag);
int Sectorbitmap_new(struct SectorbitmaP **o, int sectors, int sector_size,
int flag)
@ -7351,7 +7396,7 @@ int Xorriso_much_too_long(struct XorrisO *xorriso, int len, int flag)
int Xorriso_no_findjob(struct XorrisO *xorriso, char *cmd, int flag)
{
sprintf(xorriso->info_text, "%s: cannot set create find job object", cmd);
sprintf(xorriso->info_text, "%s: cannot create find job object", cmd);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
return(1);
}