403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/landscape/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/landscape/lib/disk.pyc

}9Rc@ sddlmZddlZddlZddlZeddddddd	d
ddd
ddddgZejdZedZ	dZ
dZdZdS(i(tdivisionNtexttext2text3text4treiserfstntfstmsdostdostvfattxfsthpfstjfstufsthfsthfspluss([a-z]+)[0-9]*cc sxt|D]}y,|jd \}}}|jd}Wntk
rUq
nX|d	k	rt||krtq
nd
}y||}Wntk
rq
nX|tj}	|tj|	|}
|tj	|	|}i|d6|d6|d6|
d6|d6Vq
Wd	S(sZ
    This is a generator that yields information about mounted filesystems.

    @param mounts_file: A file with information about mounted filesystems,
        such as C{/proc/mounts}.
    @param statvfs_: A function to get file status information.
    @param filesystems_whitelist: Optionally, a list of which filesystems to
        stat.
    @return: A C{dict} with C{device}, C{mount-point}, C{filesystem},
        C{total-space} and C{free-space} keys. If the filesystem information
        is not available, C{None} is returned. Both C{total-space} and
        C{free-space} are in megabytes.
    is
string-escapeitdevicesmount-pointt
filesystemstotal-spaces
free-spaceNi(
topentsplittdecodet
ValueErrortNonetOSErrortstatvfstF_BSIZEtF_BLOCKStF_BFREE(tmounts_filetstatvfs_tfilesystems_whitelisttlineRtmount_pointRt	megabyteststatst
block_sizettotal_spacet
free_space((s6/usr/lib/python2.7/dist-packages/landscape/lib/disk.pytget_mount_infos(


cC sd}tjj|}|jd}xft||D]U}|djd}|j|dr7|s|t| |kr|}qq7q7W|S(s
    Tries to determine to which of the mounted filesystem C{path} belongs to,
    and then returns information about that filesystem or C{None} if it
    couldn't be determined.

    @param path: The path we want filesystem information about.
    @param mounts_file: A file with information about mounted filesystems,
        such as C{/proc/mounts}.
    @param statvfs_: A function to get file status information.
    @param filesystems_whitelist: Optionally, a list of which filesystems to
        stat.
    @return: A C{dict} with C{device}, C{mount-point}, C{filesystem},
        C{total-space} and C{free-space} keys. If the filesystem information
        is not available, C{None} is returned. Both C{total-space} and
        C{free-space} are in megabytes.
    t/smount-pointN(RtostpathtrealpathRR&t
startswithtlen(R)RRt	candidatet
path_segmentstinfotmount_segments((s6/usr/lib/python2.7/dist-packages/landscape/lib/disk.pytget_filesystem_for_path6scC stjj|jdrtSt|}|s5tSd}y(t|d}|j	}WdQXWnt
k
rwtSX|jdkrtStS(s
    This function returns whether a given device is removable or not by looking
    at the corresponding /sys/block/<device>/removable file

    @param device: The filesystem path to the device, e.g. /dev/sda1
    tmmcblktrNt1(R(R)tbasenameR+tTruet_get_device_removable_file_pathtFalseRRtreadlinetIOErrortstrip(RR)tcontentstf((s6/usr/lib/python2.7/dist-packages/landscape/lib/disk.pytis_device_removableSs	
cC stjj|r$tj|}n|jdd\}tj|}|sSdS|jd}tjj	d|d}|S(s5
    Get a device's "removable" file path.

    This function figures out the C{/sys/block/<device>/removable} path
    associated with the given device. The file at that path contains either
    a "0" if the device is not removable, or a "1" if it is.

    @param device: File system path of the device.
    R'iis/sys/block/t	removableN(
R(R)tislinktreadlinkRtEXTRACT_DEVICEtmatchRtgroupstjoin(Rtdevice_nametmatchedtremovable_file((s6/usr/lib/python2.7/dist-packages/landscape/lib/disk.pyR7ps(
t
__future__RR(Rtret	frozensettSTABLE_FILESYSTEMStcompileRBR&R1R>R7(((s6/usr/lib/python2.7/dist-packages/landscape/lib/disk.pyt<module>s$		

Youez - 2016 - github.com/yon3zu
LinuXploit