91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

本代碼使 Android 系統(tǒng)能夠自動掛載 NTFS 與 exFAT 格式的 SD 卡和 U 盤,并且都支持讀寫操作。 本代碼需要修改 Android 平臺源代碼。使用的是 CyanogenMod 10.1 的源代碼,并在 Samsung GT-I9100 上測試通過。 具體編譯說明請參考 http://http://blog.csdn.net/hackpascal/article/details/8850688

資源截圖

代碼片段和文件信息

/*
main.c?(01.09.09)
FUSE-based?exFAT?implementation.?Requires?FUSE?2.6?or?later.

Copyright?(C)?2010-2013??Andrew?Nayenko

This?program?is?free?software:?you?can?redistribute?it?and/or?modify
it?under?the?terms?of?the?GNU?General?Public?License?as?published?by
the?Free?Software?Foundation?either?version?3?of?the?License?or
(at?your?option)?any?later?version.

This?program?is?distributed?in?the?hope?that?it?will?be?useful
but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
GNU?General?Public?License?for?more?details.

You?should?have?received?a?copy?of?the?GNU?General?Public?License
along?with?this?program.??If?not?see?.
*/

#define?FUSE_USE_VERSION?26
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?

#define?exfat_debug(format?...)

#if?!defined(FUSE_VERSION)?||?(FUSE_VERSION? #error?FUSE?2.6?or?later?is?required
#endif

const?char*?default_options?=?“ro_fallbackallow_otherblkdevbig_writes“
“defer_permissions“;

struct?exfat?ef;

static?struct?exfat_node*?get_node(const?struct?fuse_file_info*?fi)
{
return?(struct?exfat_node*)?(size_t)?fi->fh;
}

static?void?set_node(struct?fuse_file_info*?fi?struct?exfat_node*?node)
{
fi->fh?=?(uint64_t)?(size_t)?node;
}

static?int?fuse_exfat_getattr(const?char*?path?struct?stat*?stbuf)
{
struct?exfat_node*?node;
int?rc;

exfat_debug(“[%s]?%s“?__func__?path);

rc?=?exfat_lookup(&ef?&node?path);
if?(rc?!=?0)
return?rc;

exfat_stat(&ef?node?stbuf);
exfat_put_node(&ef?node);
return?0;
}

static?int?fuse_exfat_truncate(const?char*?path?s64?size)
{
struct?exfat_node*?node;
int?rc;

exfat_debug(“[%s]?%s?%“PRId64?__func__?path?size);

rc?=?exfat_lookup(&ef?&node?path);
if?(rc?!=?0)
return?rc;

rc?=?exfat_truncate(&ef?node?size?true);
exfat_put_node(&ef?node);
return?rc;
}

static?int?fuse_exfat_readdir(const?char*?path?void*?buffer
fuse_fill_dir_t?filler?s64?offset?struct?fuse_file_info*?fi)
{
struct?exfat_node*?parent;
struct?exfat_node*?node;
struct?exfat_iterator?it;
int?rc;
char?name[EXFAT_NAME_MAX?+?1];

exfat_debug(“[%s]?%s“?__func__?path);

rc?=?exfat_lookup(&ef?&parent?path);
if?(rc?!=?0)
return?rc;
if?(!(parent->flags?&?EXFAT_ATTRIB_DIR))
{
exfat_put_node(&ef?parent);
exfat_error(“‘%s‘?is?not?a?directory?(0x%x)“?path?parent->flags);
return?-ENOTDIR;
}

filler(buffer?“.“?NULL?0);
filler(buffer?“..“?NULL?0);

rc?=?exfat_opendir(&ef?parent?&it);
if?(rc?!=?0)
{
exfat_put_node(&ef?parent);
exfat_error(“failed?to?open?directory?‘%s‘“?path);
return?rc;
}
while?((node?=?exfat_readdir(&ef?&it)))
{
exfat_get_name(node?name?EXFAT_NAME_MAX);
exfat_debug(“[%s]?%s:?%s?%“PRId64“?bytes?cluster?0x%x“?__fun

評論

共有 條評論