Hi all,
Is there are any way to set Solaris partition active without fdisk file?
I know partition number - for example 2, so I try:
...
prepare_fdisk_target ...
uint8_t *pactive;

pactive[1]=128;                                                                 
                 
                                                                                
                              
if
(nvlist_add_uint8_array(target_attrs,                                           
               
            TI_ATTR_FDISK_PART_ACTIVE, pactive, 2) != 0) {  
(void) fprintf(stderr, "Couldn't add TI_ATTR_FDISK_PART_ACTIVE to nvlist
\n");
return(-1);                                                                     
            
}
 and then call   ti_create_target,etc.


No errors after executing, but partition still is not active.
I tested with test_ti, but it required fdisk file for work.
Of course I can call "parted --script /dev/dsk/c2t0d0p0  set 2 boot"
but I want to do this in C ;)



-- 

::alhazred

Reply via email to