mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-16 00:15:08 +01:00
0f17471b27
*Added sources of the custom libs to the branches *Fixed crash when switching from list layout to grid/carousel layout *Removed 1:1 copy option because its meaningless and almost the same as installing all partitions *Fixed install partition selection. This option needs a reset. Go to settings and reselect your option for this. *Fixed schinese and tchinese language modes (filename bugs. has to be schinese.lang and tchinese.lang like on SVN) *Fixed bug in sound buffer circle *Fixed incorrect behaviour of x-flip when selecting system like (thx Cyan for the patch) *Accept ios revision 65535 for Waninkokos IOSes (thx to PPSainity for pointing it out) *Merged the new theming style branch into trunk. Just as a reminder: ALL old themes will not work until the themers did port it to the new style! *Removed old theme style completely Theme example: The example file of the theme is the Default.them file. It can be found in the SVN trunk. Change in loading of themes: When selecting a theme now a list of all .them files in a folder is displayed. The image folder of that theme has to be in the same folder as the .them file. The image path is defined in the head of the .them file in the line with "Image-Folder: Example\n".
80 lines
1.6 KiB
C
80 lines
1.6 KiB
C
/*
|
|
* dblist_dir.c --- iterate by directory entry
|
|
*
|
|
* Copyright 1997 by Theodore Ts'o
|
|
*
|
|
* %Begin-Header%
|
|
* This file may be redistributed under the terms of the GNU Library
|
|
* General Public License, version 2.
|
|
* %End-Header%
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#if HAVE_UNISTD_H
|
|
#include <unistd.h>
|
|
#endif
|
|
#include <string.h>
|
|
#include <time.h>
|
|
|
|
#include "ext2_fs.h"
|
|
#include "ext2fsP.h"
|
|
|
|
static int db_dir_proc(ext2_filsys fs, struct ext2_db_entry2 *db_info,
|
|
void *priv_data);
|
|
|
|
errcode_t ext2fs_dblist_dir_iterate(ext2_dblist dblist,
|
|
int flags,
|
|
char *block_buf,
|
|
int (*func)(ext2_ino_t dir,
|
|
int entry,
|
|
struct ext2_dir_entry *dirent,
|
|
int offset,
|
|
int blocksize,
|
|
char *buf,
|
|
void *priv_data),
|
|
void *priv_data)
|
|
{
|
|
errcode_t retval;
|
|
struct dir_context ctx;
|
|
|
|
EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
|
|
|
|
ctx.dir = 0;
|
|
ctx.flags = flags;
|
|
if (block_buf)
|
|
ctx.buf = block_buf;
|
|
else {
|
|
retval = ext2fs_get_mem(dblist->fs->blocksize, &ctx.buf);
|
|
if (retval)
|
|
return retval;
|
|
}
|
|
ctx.func = func;
|
|
ctx.priv_data = priv_data;
|
|
ctx.errcode = 0;
|
|
|
|
retval = ext2fs_dblist_iterate2(dblist, db_dir_proc, &ctx);
|
|
|
|
if (!block_buf)
|
|
ext2fs_free_mem(&ctx.buf);
|
|
if (retval)
|
|
return retval;
|
|
return ctx.errcode;
|
|
}
|
|
|
|
static int db_dir_proc(ext2_filsys fs, struct ext2_db_entry2 *db_info,
|
|
void *priv_data)
|
|
{
|
|
struct dir_context *ctx;
|
|
int ret;
|
|
|
|
ctx = (struct dir_context *) priv_data;
|
|
ctx->dir = db_info->ino;
|
|
ctx->errcode = 0;
|
|
|
|
ret = ext2fs_process_dir_block(fs, &db_info->blk,
|
|
db_info->blockcnt, 0, 0, priv_data);
|
|
if ((ret & BLOCK_ABORT) && !ctx->errcode)
|
|
return DBLIST_ABORT;
|
|
return 0;
|
|
}
|