Skip to content

Commit 9960d2e

Browse files
authored
[posix.cfg] Fix fstat family (#2629)
* [posix.cfg] Fix fstat family * Move fstatat64 and __fxstatat64 to gnu.cfg
1 parent 36bacc5 commit 9960d2e

2 files changed

Lines changed: 52 additions & 6 deletions

File tree

cfg/gnu.cfg

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,54 @@
13201320
<not-bool/>
13211321
</arg>
13221322
</function>
1323+
<!-- Note: fstatat64() is a large-file version of the fstatat() function -->
1324+
<!-- int fstatat64(int dirfd, const char *pathname, struct stat64 *statbuf, int flags); -->
1325+
<function name="fstatat64">
1326+
<noreturn>false</noreturn>
1327+
<leak-ignore/>
1328+
<returnValue type="int"/>
1329+
<arg nr="1" direction="in">
1330+
<not-uninit/>
1331+
<valid>0:</valid>
1332+
</arg>
1333+
<arg nr="2" direction="in">
1334+
<not-null/>
1335+
<not-uninit/>
1336+
</arg>
1337+
<arg nr="3" direction="out">
1338+
<not-null/>
1339+
<not-bool/>
1340+
</arg>
1341+
<arg nr="4" direction="in">
1342+
<not-bool/>
1343+
<not-uninit/>
1344+
</arg>
1345+
</function>
1346+
<!-- int __fxstatat64 (int __ver, int __fildes, const char *__filename, struct stat64 *__stat_buf, int __flag); -->
1347+
<function name="__fxstatat64">
1348+
<noreturn>false</noreturn>
1349+
<leak-ignore/>
1350+
<returnValue type="int"/>
1351+
<arg nr="1" direction="in">
1352+
<not-uninit/>
1353+
</arg>
1354+
<arg nr="2" direction="in">
1355+
<not-uninit/>
1356+
<valid>0:</valid>
1357+
</arg>
1358+
<arg nr="3" direction="in">
1359+
<not-null/>
1360+
<not-uninit/>
1361+
</arg>
1362+
<arg nr="4" direction="out">
1363+
<not-null/>
1364+
<not-bool/>
1365+
</arg>
1366+
<arg nr="5" direction="in">
1367+
<not-bool/>
1368+
<not-uninit/>
1369+
</arg>
1370+
</function>
13231371
<!-- ########## Resource allocation ########## -->
13241372
<resource>
13251373
<alloc init="true">mkostemp</alloc>

cfg/posix.cfg

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,13 +1400,13 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
14001400
<not-bool/>
14011401
</arg>
14021402
</function>
1403-
<!-- int fstat(const char *file_name, struct stat *buf); -->
1403+
<!-- int fstat(int fd, struct stat *statbuf); -->
14041404
<function name="fstat">
14051405
<noreturn>false</noreturn>
14061406
<leak-ignore/>
14071407
<returnValue type="int"/>
14081408
<arg nr="1" direction="in">
1409-
<not-null/>
1409+
<valid>0:</valid>
14101410
<not-uninit/>
14111411
</arg>
14121412
<arg nr="2" direction="out">
@@ -1415,15 +1415,13 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
14151415
</arg>
14161416
</function>
14171417
<!-- int fstatat(int dirfd, const char *pathname, struct stat *statbuf, int flags); -->
1418-
<!-- Note: fstatat64() is a large-file version of the fstatat() function as defined in POSIX 1003.1-2008 (ISO/IEC 9945-2009). -->
1419-
<!-- int fstatat64(int dirfd, const char *pathname, struct stat64 *statbuf, int flags); -->
1420-
<!-- int __fxstatat64(int dirfd, const char *pathname, struct stat64 *statbuf, int flags); -->
1421-
<function name="fstatat,fstatat64,__fxstatat64">
1418+
<function name="fstatat">
14221419
<noreturn>false</noreturn>
14231420
<leak-ignore/>
14241421
<returnValue type="int"/>
14251422
<arg nr="1" direction="in">
14261423
<not-uninit/>
1424+
<valid>0:</valid>
14271425
</arg>
14281426
<arg nr="2" direction="in">
14291427
<not-null/>

0 commit comments

Comments
 (0)