mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 20:11:42 +01:00
17 lines
340 B
C
17 lines
340 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <stdint.h>
|
||
|
#include <unistd.h>
|
||
|
#include <errno.h>
|
||
|
#include <fcntl.h>
|
||
|
|
||
|
int main(int argc, char *argv[]) {
|
||
|
int i;
|
||
|
for (i=1; i<argc; i++) {
|
||
|
int fd = open(argv[i], O_RDONLY);
|
||
|
printf("%s: %d %d\n", argv[i], fd, errno);
|
||
|
if (fd >= 0) close(fd);
|
||
|
}
|
||
|
return 0;
|
||
|
}
|