1 Star 0 Fork 12

SEmmmer/fakechroot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
75d7e6fa191c11a791faff06a0de86eaa7801d05.patch 2.75 KB
一键复制 编辑 原始数据 按行查看 历史
xu_ping 提交于 2022-01-27 18:56 . remove unuse files
From 75d7e6fa191c11a791faff06a0de86eaa7801d05 Mon Sep 17 00:00:00 2001
From: Ilya Lipnitskiy <[email protected]>
Date: Mon, 22 Feb 2021 21:46:36 -0800
Subject: [PATCH] declare missing bufs, remove ver from lstat
Signed-off-by: Ilya Lipnitskiy <[email protected]>
---
src/lstat.c | 8 +++++---
src/lstat.h | 2 +-
src/mknod.c | 2 ++
src/stat.c | 2 ++
src/stat64.c | 2 ++
5 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/lstat.c b/src/lstat.c
index 3f6d819..54e3263 100644
--- a/src/lstat.c
+++ b/src/lstat.c
@@ -28,9 +28,11 @@
#include "lstat.h"
-wrapper(lstat, int, (int ver, const char * filename, struct stat * buf))
+wrapper(lstat, int, (const char * filename, struct stat * buf))
{
- debug("lstat(%d, \"%s\", &buf)", ver, filename);
+ char fakechroot_abspath[FAKECHROOT_PATH_MAX];
+ char fakechroot_buf[FAKECHROOT_PATH_MAX];
+ debug("lstat(\"%s\", &buf)", filename);
if (!fakechroot_localdir(filename)) {
if (filename != NULL) {
@@ -40,7 +42,7 @@ wrapper(lstat, int, (int ver, const char * filename, struct stat * buf))
}
}
- return lstat_rel(ver, filename, buf);
+ return lstat_rel(filename, buf);
}
diff --git a/src/lstat.h b/src/lstat.h
index 751c1ea..ee48303 100644
--- a/src/lstat.h
+++ b/src/lstat.h
@@ -26,7 +26,7 @@
#ifndef HAVE___LXSTAT
-wrapper_proto(lstat, int, (int, const char *, struct stat *));
+wrapper_proto(lstat, int, (const char *, struct stat *));
int lstat_rel(const char *, struct stat *);
diff --git a/src/mknod.c b/src/mknod.c
index 52fd33b..2771037 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -28,6 +28,8 @@
wrapper(mknod, int, (const char * pathname, mode_t mode, dev_t dev))
{
+ char fakechroot_abspath[FAKECHROOT_PATH_MAX];
+ char fakechroot_buf[FAKECHROOT_PATH_MAX];
debug("mknod(\"%s\", 0%o, %ld)", pathname, mode, dev);
expand_chroot_path(pathname);
return nextcall(mknod)(pathname, mode, dev);
diff --git a/src/stat.c b/src/stat.c
index 7845662..7b37793 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -33,6 +33,8 @@
wrapper(stat, int, (const char * file_name, struct stat * buf))
{
+ char fakechroot_abspath[FAKECHROOT_PATH_MAX];
+ char fakechroot_buf[FAKECHROOT_PATH_MAX];
debug("stat(\"%s\", &buf)", file_name);
expand_chroot_path(file_name);
return nextcall(stat)(file_name, buf);
diff --git a/src/stat64.c b/src/stat64.c
index aac9c75..a360f66 100644
--- a/src/stat64.c
+++ b/src/stat64.c
@@ -34,6 +34,8 @@
wrapper(stat64, int, (const char * file_name, struct stat64 * buf))
{
+ char fakechroot_abspath[FAKECHROOT_PATH_MAX];
+ char fakechroot_buf[FAKECHROOT_PATH_MAX];
debug("stat64(\"%s\", &buf)", file_name);
expand_chroot_path(file_name);
return nextcall(stat64)(file_name, buf);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/emmmer/fakechroot.git
[email protected]:emmmer/fakechroot.git
emmmer
fakechroot
fakechroot
master

搜索帮助