Skip to content

Commit 8236fba

Browse files
authored
Merge pull request #9 from mlaux/master
Add prototype for ps2link_response_getstat, fix compile warning
2 parents 53df980 + 4932fbb commit 8236fba

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/ps2link.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,13 +584,14 @@ int ps2link_request_getstat(void *packet) {
584584
struct { unsigned int number; unsigned short length; char name[256]; } PACKED *request = packet;
585585
struct stat stats; struct tm *loctime;
586586
int ret;
587-
unsigned int mode; unsigned char ctime[8]; unsigned char atime[8]; unsigned char mtime[8];
587+
unsigned int mode = 0;
588+
unsigned char ctime[8]; unsigned char atime[8]; unsigned char mtime[8];
588589

589590
// Fix the arguments.
590591
fix_pathname(request->name);
591592

592-
// Fetch the entry's statistics.
593-
ret = stat(request->name, &stats);
593+
// Fetch the entry's statistics.
594+
ret = stat(request->name, &stats);
594595

595596
if (ret == 0) {
596597
// Convert the mode.

src/ps2link.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@
133133

134134
int ps2link_response_rmdir(int result);
135135

136+
int ps2link_response_getstat(
137+
int result,
138+
unsigned int mode,
139+
unsigned int attr,
140+
unsigned int size,
141+
unsigned char *ctime,
142+
unsigned char *atime,
143+
unsigned char *mtime,
144+
unsigned int hisize
145+
);
146+
136147
//////////////////////////////
137148
// PS2LINK THREAD FUNCTIONS //
138149
//////////////////////////////

0 commit comments

Comments
 (0)