aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo_ipc.c
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2012-08-02 18:09:17 -0500
committerPeter Seebach <peter.seebach@windriver.com>2012-08-02 18:33:53 -0500
commit400e1a09e98cc11e18e418ece0a78acfd226b381 (patch)
tree07d7a682d3dbf89033b1069c3e0316d29b398aa5 /pseudo_ipc.c
parent9b792e4cb91bc22374f47d0b0902dbc4ecd7d6dd (diff)
downloadpseudo-400e1a09e98cc11e18e418ece0a78acfd226b381.tar.gz
pseudo-400e1a09e98cc11e18e418ece0a78acfd226b381.tar.bz2
pseudo-400e1a09e98cc11e18e418ece0a78acfd226b381.zip
Remove the _plain thing, use PSEUDO_STATBUF everywhere.
The _plain thing was added because of clashes between Linux ("struct stat64 for 64-bit file sizes") and Darwin ("struct stat is already 64 bits"). But it turns out not to be enough, because stat will *fail* if it cannot represent a file size, so when something like unlinkat() calls a non-64-bit stat in order to determine whether a file exists, it gets the wrong answer if the file is over 2GB in size. Solution: Continue using PSEUDO_STATBUF, and also provide defines for base_stat() which can be either real_stat() or real_stat64(), etcetera. This eliminates any reason to need the _plain functions. It also suggests that the other real___fxstatat() calls should someday go away because that is an ugly, ugly, implementation detail. As part of testing this, fix up some bitrot which affected Darwin (such as the continue outside of a loop, but inside an #ifdef; that was left over from the conversion of init_one_wrapper to a separate function).
Diffstat (limited to 'pseudo_ipc.c')
-rw-r--r--pseudo_ipc.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/pseudo_ipc.c b/pseudo_ipc.c
index 341c647..b76e37a 100644
--- a/pseudo_ipc.c
+++ b/pseudo_ipc.c
@@ -241,24 +241,3 @@ pseudo_stat_msg(PSEUDO_STATBUF *buf, const pseudo_msg_t *msg) {
buf->st_mode = msg->mode;
buf->st_rdev = msg->rdev;
}
-
-#if PSEUDO_STATBUF_64
-void
-pseudo_msg_stat_plain(pseudo_msg_t *msg, const struct stat *buf) {
- PSEUDO_STATBUF buf64;
- if (buf) {
- pseudo_stat64_from32(&buf64, buf);
- pseudo_msg_stat(msg, &buf64);
- }
-}
-
-void
-pseudo_stat_msg_plain(struct stat *buf, const pseudo_msg_t *msg) {
- PSEUDO_STATBUF buf64;
- if (buf) {
- pseudo_stat64_from32(&buf64, buf);
- pseudo_stat_msg(&buf64, msg);
- pseudo_stat32_from64(buf, &buf64);
- }
-}
-#endif