Ñò h'dWc @sµdZddkZddklZlZlZlZddkl Z ddk Z ddk Z ddk l Z lZddklZddklZddklZd Zd „ZdS( s: Python package with ctypes wrapper for libdevinfo(3LIB). iÿÿÿÿN(tEINVALtEPERMtENOENTtENODATA(t processor(tcfunctconst(tBootDevp(tALIAS(tdescriptor_from_keyi0c Cstitƒƒ}tiƒ}tidti|ƒƒ}|tijo7t ƒdjo d}n dd}t t |ƒ‚nˆ|ti jot dƒ‚nh|djoZhtti6tti6tti6tti6i||ƒ}t |dti|ƒƒ‚nzØd}g}x.||o"|i||iƒ|d 7}qWx”|D]Œ}|iii}|d joqNn|id ƒ\}}} |oti d | ƒd} nqNt!t"| ƒ} | i#} | i$p| SqNWWd ti%|ƒXt td ƒ‚d S(sá get_curr_bootdisk() -> str function to return the ctd string of the system's bootdisk. On x86 raises OSError with errno=ENODATA on fast reboot. Also raises OSError with errno=ENOENT if no bootdisk is found. t/tsparcs8devfs_bootdev_get_list(): OBP diagnostic mode turned on?s3devfs_bootdev_get_list(): unable to open GRUB disk smap. Did you fast-reboot?s-devfs_bootdev_get_list(): insufficient memoryisdevfs_bootdev_get_list(): %sis /dev/dsk/s[sp]Ns+devfs_bootdev_get_list(): no bootdisk found(&tCtPOINTERRtc_intRtdevfs_bootdev_get_listtbyrefRt DEVFS_ERRRtOSErrorRt DEVFS_NOMEMt MemoryErrorRt DEVFS_INVALRt DEVFS_PERMtENOTSUPt DEVFS_NOTSUPRtDEVFS_NOTFOUNDtgettoststrerrortappendtcontentst bootdev_transtvaluetNonet partitiontretsplitR Rtdrivetcdromtdevfs_bootdev_free_list( tbootdevsterrterrstrtit bootdev_listtbootdevtctd_patht_nonetseptdisktctdtaliasR%((s../__init__.pytget_curr_bootdisk+sN            (t__doc__tctypesR terrnoRRRRtplatformRRR#t libdevinfoRRtlibdevinfo.cstructRtlibdiskmgt.constRt libdiskmgtR RR4(((s../__init__.pyts "