mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-10 21:35:24 +01:00
30 lines
566 B
C
30 lines
566 B
C
/*
|
|
* SPDX-FileCopyrightText: 2022 Samuel Tyler <samuel@samuelt.me>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#include <sys/stat.h>
|
|
#include <linux/syscall.h>
|
|
#include <linux/x86/syscall.h>
|
|
|
|
int _stat(const char *path, struct stat *buf) {
|
|
int rc = stat(path, buf);
|
|
if (rc == 0) {
|
|
buf->st_atime = 0;
|
|
buf->st_mtime = 0;
|
|
}
|
|
return rc;
|
|
}
|
|
|
|
int _lstat(const char *path, struct stat *buf) {
|
|
int rc = lstat(path, buf);
|
|
if (rc == 0) {
|
|
buf->st_atime = 0;
|
|
buf->st_mtime = 0;
|
|
}
|
|
return rc;
|
|
}
|
|
|
|
#define stat(a,b) _stat(a,b)
|
|
#define lstat(a,b) _lstat(a,b)
|