log: normalize AFP create delete rename messages
This commit is contained in:
182
src/nwconn.c
182
src/nwconn.c
@@ -1050,10 +1050,13 @@ static int afp_create_file(uint8 *afp_req, int afp_len,
|
||||
struct stat stbuff;
|
||||
uint32 entry_id = 0;
|
||||
int fallback = 0;
|
||||
int sub = (afp_len > 0) ? afp_req[0] : 0;
|
||||
int afp_no = (sub == 0x0e) ? 14 : 2;
|
||||
|
||||
(void)call_name;
|
||||
if (afp_len < 40) {
|
||||
XDPRINTF((2,0, "%s rejected: short request len=%d",
|
||||
call_name, afp_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/%d REJECT reason=short_request len=%d fn=0x23 sub=0x%02x result=0x7e",
|
||||
afp_no, afp_len, sub));
|
||||
return(-0x7e);
|
||||
}
|
||||
|
||||
@@ -1061,8 +1064,8 @@ static int afp_create_file(uint8 *afp_req, int afp_len,
|
||||
path_len_off = is_afp20 ? 45 : 39;
|
||||
path_off = is_afp20 ? 46 : 40;
|
||||
if (afp_len <= path_len_off) {
|
||||
XDPRINTF((2,0, "%s rejected: short request len=%d",
|
||||
call_name, afp_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/%d REJECT reason=short_request len=%d fn=0x23 sub=0x%02x result=0x7e",
|
||||
afp_no, afp_len, sub));
|
||||
return(-0x7e);
|
||||
}
|
||||
|
||||
@@ -1072,18 +1075,19 @@ static int afp_create_file(uint8 *afp_req, int afp_len,
|
||||
finder_info = afp_req + 7;
|
||||
path_len = (int)afp_req[path_len_off];
|
||||
if (path_len < 0 || afp_len < path_off + path_len) {
|
||||
XDPRINTF((2,0, "%s rejected: boundary check len=%d path_len=%d",
|
||||
call_name, afp_len, path_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/%d REJECT reason=boundary_check len=%d path_len=%d fn=0x23 sub=0x%02x result=0x7e",
|
||||
afp_no, afp_len, path_len, sub));
|
||||
return(-0x7e);
|
||||
}
|
||||
|
||||
if (!nwatalk_backend_available()) {
|
||||
XDPRINTF((3,0, "%s rejected: AFP xattr metadata backend unavailable", call_name));
|
||||
XDPRINTF((3,0, "WARN AFP 35/%d REJECT reason=xattr_backend_unavailable fn=0x23 sub=0x%02x result=0xbf",
|
||||
afp_no, sub));
|
||||
return(-0xbf);
|
||||
}
|
||||
if (!path_len) {
|
||||
XDPRINTF((2,0, "%s rejected: empty path vol=%d base=0x%08x",
|
||||
call_name, (int)volume_number, base_entry_id));
|
||||
XDPRINTF((2,0, "WARN AFP 35/%d REJECT reason=empty_path vol=%d base=%u fn=0x23 sub=0x%02x base_hex=0x%08x result=0x9c",
|
||||
afp_no, (int)volume_number, base_entry_id, sub, base_entry_id));
|
||||
return(-0x9c);
|
||||
}
|
||||
|
||||
@@ -1091,9 +1095,9 @@ static int afp_create_file(uint8 *afp_req, int afp_len,
|
||||
afp_req + path_off, path_len,
|
||||
create_path, sizeof(create_path));
|
||||
if (result < 0) {
|
||||
XDPRINTF((2,0, "%s path build failed: vol=%d base=0x%08x path='%s' result=-0x%x",
|
||||
call_name, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), -result));
|
||||
XDPRINTF((2,0, "WARN MAP 35/%d FAIL reason=path_build vol=%d base=%u path='%s' result=0x%x fn=0x23 sub=0x%02x base_hex=0x%08x",
|
||||
afp_no, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), -result, sub, base_entry_id));
|
||||
return(result);
|
||||
}
|
||||
|
||||
@@ -1103,34 +1107,34 @@ static int afp_create_file(uint8 *afp_req, int afp_len,
|
||||
|
||||
if (!stat(unixname, &stbuff)) {
|
||||
if (S_ISDIR(stbuff.st_mode)) {
|
||||
XDPRINTF((2,0, "%s rejected: existing directory vol=%d base=0x%08x path='%s' unix='%s'",
|
||||
call_name, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), unixname));
|
||||
XDPRINTF((2,0, "WARN FILE 35/%d REJECT reason=existing_directory vol=%d base=%u path='%s' unix='%s' fn=0x23 sub=0x%02x base_hex=0x%08x result=0xff",
|
||||
afp_no, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), unixname, sub, base_entry_id));
|
||||
return(-0xff);
|
||||
}
|
||||
if (!delete_existing) {
|
||||
XDPRINTF((2,0, "%s rejected: file exists vol=%d base=0x%08x path='%s' unix='%s'",
|
||||
call_name, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), unixname));
|
||||
XDPRINTF((2,0, "WARN FILE 35/%d REJECT reason=file_exists vol=%d base=%u path='%s' unix='%s' fn=0x23 sub=0x%02x base_hex=0x%08x result=0xff",
|
||||
afp_no, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), unixname, sub, base_entry_id));
|
||||
return(-0xff);
|
||||
}
|
||||
|
||||
result = nw_delete_files(0, 0, create_path, strlen((char *)create_path));
|
||||
if (result < 0) {
|
||||
XDPRINTF((2,0, "%s delete-existing failed: vol=%d base=0x%08x path='%s' mars_path='%s' result=-0x%x",
|
||||
call_name, (int)volume_number, base_entry_id,
|
||||
XDPRINTF((2,0, "WARN FILE 35/%d FAIL reason=delete_existing vol=%d base=%u path='%s' mars_path='%s' result=0x%x fn=0x23 sub=0x%02x base_hex=0x%08x",
|
||||
afp_no, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), create_path,
|
||||
-result));
|
||||
-result, sub, base_entry_id));
|
||||
return(result);
|
||||
}
|
||||
}
|
||||
|
||||
result = nw_creat_node(volume, (uint8 *)unixname, 0);
|
||||
if (result < 0) {
|
||||
XDPRINTF((2,0, "%s create failed: vol=%d base=0x%08x path='%s' mars_path='%s' unix='%s' result=-0x%x",
|
||||
call_name, (int)volume_number, base_entry_id,
|
||||
XDPRINTF((2,0, "WARN FILE 35/%d FAIL reason=create vol=%d base=%u path='%s' mars_path='%s' unix='%s' result=0x%x fn=0x23 sub=0x%02x base_hex=0x%08x",
|
||||
afp_no, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), create_path,
|
||||
unixname, -result));
|
||||
unixname, -result, sub, base_entry_id));
|
||||
return(result);
|
||||
}
|
||||
|
||||
@@ -1140,10 +1144,10 @@ static int afp_create_file(uint8 *afp_req, int afp_len,
|
||||
entry_id = afp_get_or_create_entry_id(unixname, volume, &stbuff, &fallback);
|
||||
U32_TO_BE32(entry_id, response);
|
||||
|
||||
XDPRINTF((3,0, "%s: request_vol=%d resolved_vol=%d base=0x%08x path='%s' entry=0x%08x%s",
|
||||
call_name, (int)volume_number, volume, base_entry_id,
|
||||
XDPRINTF((3,0, "INFO AFP 35/%d DONE request_vol=%d resolved_vol=%d base=%u path='%s' entry=%u mode='%s' fn=0x23 sub=0x%02x base_hex=0x%08x entry_hex=0x%08x",
|
||||
afp_no, (int)volume_number, volume, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), entry_id,
|
||||
fallback ? " fallback" : ""));
|
||||
fallback ? "fallback" : "", sub, base_entry_id, entry_id));
|
||||
return(4);
|
||||
}
|
||||
|
||||
@@ -1173,10 +1177,13 @@ static int afp_create_directory(uint8 *afp_req, int afp_len,
|
||||
struct stat stbuff;
|
||||
uint32 entry_id = 0;
|
||||
int fallback = 0;
|
||||
int sub = (afp_len > 0) ? afp_req[0] : 0;
|
||||
int afp_no = (sub == 0x0d) ? 13 : 1;
|
||||
|
||||
(void)call_name;
|
||||
if (afp_len < 40) {
|
||||
XDPRINTF((2,0, "%s rejected: short request len=%d",
|
||||
call_name, afp_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/%d REJECT reason=short_request len=%d fn=0x23 sub=0x%02x result=0x7e",
|
||||
afp_no, afp_len, sub));
|
||||
return(-0x7e);
|
||||
}
|
||||
|
||||
@@ -1184,8 +1191,8 @@ static int afp_create_directory(uint8 *afp_req, int afp_len,
|
||||
path_len_off = is_afp20 ? 45 : 39;
|
||||
path_off = is_afp20 ? 46 : 40;
|
||||
if (afp_len <= path_len_off) {
|
||||
XDPRINTF((2,0, "%s rejected: short request len=%d",
|
||||
call_name, afp_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/%d REJECT reason=short_request len=%d fn=0x23 sub=0x%02x result=0x7e",
|
||||
afp_no, afp_len, sub));
|
||||
return(-0x7e);
|
||||
}
|
||||
|
||||
@@ -1194,18 +1201,19 @@ static int afp_create_directory(uint8 *afp_req, int afp_len,
|
||||
finder_info = afp_req + 7;
|
||||
path_len = (int)afp_req[path_len_off];
|
||||
if (path_len < 0 || afp_len < path_off + path_len) {
|
||||
XDPRINTF((2,0, "%s rejected: boundary check len=%d path_len=%d",
|
||||
call_name, afp_len, path_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/%d REJECT reason=boundary_check len=%d path_len=%d fn=0x23 sub=0x%02x result=0x7e",
|
||||
afp_no, afp_len, path_len, sub));
|
||||
return(-0x7e);
|
||||
}
|
||||
|
||||
if (!nwatalk_backend_available()) {
|
||||
XDPRINTF((3,0, "%s rejected: AFP xattr metadata backend unavailable", call_name));
|
||||
XDPRINTF((3,0, "WARN AFP 35/%d REJECT reason=xattr_backend_unavailable fn=0x23 sub=0x%02x result=0xbf",
|
||||
afp_no, sub));
|
||||
return(-0xbf);
|
||||
}
|
||||
if (!path_len) {
|
||||
XDPRINTF((2,0, "%s rejected: empty path vol=%d base=0x%08x",
|
||||
call_name, (int)volume_number, base_entry_id));
|
||||
XDPRINTF((2,0, "WARN AFP 35/%d REJECT reason=empty_path vol=%d base=%u fn=0x23 sub=0x%02x base_hex=0x%08x result=0x9c",
|
||||
afp_no, (int)volume_number, base_entry_id, sub, base_entry_id));
|
||||
return(-0x9c);
|
||||
}
|
||||
|
||||
@@ -1213,18 +1221,18 @@ static int afp_create_directory(uint8 *afp_req, int afp_len,
|
||||
afp_req + path_off, path_len,
|
||||
create_path, sizeof(create_path));
|
||||
if (result < 0) {
|
||||
XDPRINTF((2,0, "%s path build failed: vol=%d base=0x%08x path='%s' result=-0x%x",
|
||||
call_name, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), -result));
|
||||
XDPRINTF((2,0, "WARN MAP 35/%d FAIL reason=path_build vol=%d base=%u path='%s' result=0x%x fn=0x23 sub=0x%02x base_hex=0x%08x",
|
||||
afp_no, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), -result, sub, base_entry_id));
|
||||
return(result);
|
||||
}
|
||||
|
||||
result = nw_mk_rd_dir(0, create_path, strlen((char *)create_path), 1);
|
||||
if (result < 0) {
|
||||
XDPRINTF((2,0, "%s create failed: vol=%d base=0x%08x path='%s' mars_path='%s' result=-0x%x",
|
||||
call_name, (int)volume_number, base_entry_id,
|
||||
XDPRINTF((2,0, "WARN FILE 35/%d FAIL reason=create vol=%d base=%u path='%s' mars_path='%s' result=0x%x fn=0x23 sub=0x%02x base_hex=0x%08x",
|
||||
afp_no, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), create_path,
|
||||
-result));
|
||||
-result, sub, base_entry_id));
|
||||
return(result);
|
||||
}
|
||||
|
||||
@@ -1238,10 +1246,10 @@ static int afp_create_directory(uint8 *afp_req, int afp_len,
|
||||
entry_id = afp_get_or_create_entry_id(unixname, volume, &stbuff, &fallback);
|
||||
U32_TO_BE32(entry_id, response);
|
||||
|
||||
XDPRINTF((3,0, "%s: request_vol=%d resolved_vol=%d base=0x%08x path='%s' entry=0x%08x%s",
|
||||
call_name, (int)volume_number, volume, base_entry_id,
|
||||
XDPRINTF((3,0, "INFO AFP 35/%d DONE request_vol=%d resolved_vol=%d base=%u path='%s' entry=%u mode='%s' fn=0x23 sub=0x%02x base_hex=0x%08x entry_hex=0x%08x",
|
||||
afp_no, (int)volume_number, volume, base_entry_id,
|
||||
visable_data(afp_req + path_off, path_len), entry_id,
|
||||
fallback ? " fallback" : ""));
|
||||
fallback ? "fallback" : "", sub, base_entry_id, entry_id));
|
||||
return(4);
|
||||
}
|
||||
|
||||
@@ -1267,9 +1275,10 @@ static int afp_delete_object(uint8 *afp_req, int afp_len,
|
||||
int result;
|
||||
struct stat stbuff;
|
||||
|
||||
(void)call_name;
|
||||
if (afp_len < 7) {
|
||||
XDPRINTF((2,0, "%s rejected: short request len=%d",
|
||||
call_name, afp_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/3 REJECT reason=short_request len=%d fn=0x23 sub=0x03 result=0x7e",
|
||||
afp_len));
|
||||
return(-0x7e);
|
||||
}
|
||||
|
||||
@@ -1277,13 +1286,13 @@ static int afp_delete_object(uint8 *afp_req, int afp_len,
|
||||
base_entry_id = GET_BE32(afp_req + 2);
|
||||
path_len = (int)afp_req[6];
|
||||
if (path_len < 0 || afp_len < 7 + path_len) {
|
||||
XDPRINTF((2,0, "%s rejected: boundary check len=%d path_len=%d",
|
||||
call_name, afp_len, path_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/3 REJECT reason=boundary_check len=%d path_len=%d fn=0x23 sub=0x03 result=0x7e",
|
||||
afp_len, path_len));
|
||||
return(-0x7e);
|
||||
}
|
||||
if (!path_len) {
|
||||
XDPRINTF((2,0, "%s rejected: empty path vol=%d base=0x%08x",
|
||||
call_name, (int)volume_number, base_entry_id));
|
||||
XDPRINTF((2,0, "WARN AFP 35/3 REJECT reason=empty_path vol=%d base=%u fn=0x23 sub=0x03 base_hex=0x%08x result=0x9c",
|
||||
(int)volume_number, base_entry_id, base_entry_id));
|
||||
return(-0x9c);
|
||||
}
|
||||
|
||||
@@ -1291,9 +1300,9 @@ static int afp_delete_object(uint8 *afp_req, int afp_len,
|
||||
afp_req + 7, path_len,
|
||||
delete_path, sizeof(delete_path));
|
||||
if (result < 0) {
|
||||
XDPRINTF((2,0, "%s path build failed: vol=%d base=0x%08x path='%s' result=-0x%x",
|
||||
call_name, (int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + 7, path_len), -result));
|
||||
XDPRINTF((2,0, "WARN MAP 35/3 FAIL reason=path_build vol=%d base=%u path='%s' result=0x%x fn=0x23 sub=0x03 base_hex=0x%08x",
|
||||
(int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + 7, path_len), -result, base_entry_id));
|
||||
return(result);
|
||||
}
|
||||
|
||||
@@ -1301,10 +1310,10 @@ static int afp_delete_object(uint8 *afp_req, int afp_len,
|
||||
delete_path, strlen((char *)delete_path));
|
||||
if (volume < 0) return(volume);
|
||||
if (stat(unixname, &stbuff)) {
|
||||
XDPRINTF((2,0, "%s stat failed: vol=%d base=0x%08x path='%s' mars_path='%s' unix='%s' errno=%d",
|
||||
call_name, (int)volume_number, base_entry_id,
|
||||
XDPRINTF((2,0, "WARN FILE 35/3 FAIL reason=stat vol=%d base=%u path='%s' mars_path='%s' unix='%s' errno=%d fn=0x23 sub=0x03 base_hex=0x%08x result=0x9c",
|
||||
(int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + 7, path_len), delete_path, unixname,
|
||||
errno));
|
||||
errno, base_entry_id));
|
||||
return(-0x9c);
|
||||
}
|
||||
|
||||
@@ -1314,16 +1323,16 @@ static int afp_delete_object(uint8 *afp_req, int afp_len,
|
||||
result = nw_delete_files(0, 0, delete_path, strlen((char *)delete_path));
|
||||
}
|
||||
if (result < 0) {
|
||||
XDPRINTF((2,0, "%s delete failed: vol=%d base=0x%08x path='%s' mars_path='%s' unix='%s' result=-0x%x",
|
||||
call_name, (int)volume_number, base_entry_id,
|
||||
XDPRINTF((2,0, "WARN FILE 35/3 FAIL reason=delete vol=%d base=%u path='%s' mars_path='%s' unix='%s' result=0x%x fn=0x23 sub=0x03 base_hex=0x%08x",
|
||||
(int)volume_number, base_entry_id,
|
||||
visable_data(afp_req + 7, path_len), delete_path, unixname,
|
||||
-result));
|
||||
-result, base_entry_id));
|
||||
return(result);
|
||||
}
|
||||
|
||||
XDPRINTF((3,0, "%s: request_vol=%d resolved_vol=%d base=0x%08x path='%s' directory=%d",
|
||||
call_name, (int)volume_number, volume, base_entry_id,
|
||||
visable_data(afp_req + 7, path_len), S_ISDIR(stbuff.st_mode) ? 1 : 0));
|
||||
XDPRINTF((3,0, "INFO AFP 35/3 DONE request_vol=%d resolved_vol=%d base=%u path='%s' directory=%d fn=0x23 sub=0x03 base_hex=0x%08x",
|
||||
(int)volume_number, volume, base_entry_id,
|
||||
visable_data(afp_req + 7, path_len), S_ISDIR(stbuff.st_mode) ? 1 : 0, base_entry_id));
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -1352,9 +1361,10 @@ static int afp_rename_object(uint8 *afp_req, int afp_len,
|
||||
int result;
|
||||
struct stat stbuff;
|
||||
|
||||
(void)call_name;
|
||||
if (afp_len < 12) {
|
||||
XDPRINTF((2,0, "%s rejected: short request len=%d",
|
||||
call_name, afp_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/7 REJECT reason=short_request len=%d fn=0x23 sub=0x07 result=0x7e",
|
||||
afp_len));
|
||||
return(-0x7e);
|
||||
}
|
||||
|
||||
@@ -1363,21 +1373,21 @@ static int afp_rename_object(uint8 *afp_req, int afp_len,
|
||||
dest_entry_id = GET_BE32(afp_req + 6);
|
||||
source_len = (int)afp_req[10];
|
||||
if (source_len < 0 || afp_len < 11 + source_len + 1) {
|
||||
XDPRINTF((2,0, "%s rejected: source boundary check len=%d source_len=%d",
|
||||
call_name, afp_len, source_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/7 REJECT reason=source_boundary_check len=%d source_len=%d fn=0x23 sub=0x07 result=0x7e",
|
||||
afp_len, source_len));
|
||||
return(-0x7e);
|
||||
}
|
||||
|
||||
dest_len_off = 11 + source_len;
|
||||
dest_len = (int)afp_req[dest_len_off];
|
||||
if (dest_len < 0 || afp_len < dest_len_off + 1 + dest_len) {
|
||||
XDPRINTF((2,0, "%s rejected: dest boundary check len=%d dest_len=%d",
|
||||
call_name, afp_len, dest_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/7 REJECT reason=dest_boundary_check len=%d dest_len=%d fn=0x23 sub=0x07 result=0x7e",
|
||||
afp_len, dest_len));
|
||||
return(-0x7e);
|
||||
}
|
||||
if (!source_len || !dest_len) {
|
||||
XDPRINTF((2,0, "%s rejected: empty source/dest source_len=%d dest_len=%d",
|
||||
call_name, source_len, dest_len));
|
||||
XDPRINTF((2,0, "WARN AFP 35/7 REJECT reason=empty_source_or_dest source_len=%d dest_len=%d fn=0x23 sub=0x07 result=0x9c",
|
||||
source_len, dest_len));
|
||||
return(-0x9c);
|
||||
}
|
||||
|
||||
@@ -1385,9 +1395,9 @@ static int afp_rename_object(uint8 *afp_req, int afp_len,
|
||||
afp_req + 11, source_len,
|
||||
source_path, sizeof(source_path));
|
||||
if (result < 0) {
|
||||
XDPRINTF((2,0, "%s source path build failed: vol=%d base=0x%08x path='%s' result=-0x%x",
|
||||
call_name, (int)volume_number, source_entry_id,
|
||||
visable_data(afp_req + 11, source_len), -result));
|
||||
XDPRINTF((2,0, "WARN MAP 35/7 FAIL reason=source_path_build vol=%d base=%u path='%s' result=0x%x fn=0x23 sub=0x07 base_hex=0x%08x",
|
||||
(int)volume_number, source_entry_id,
|
||||
visable_data(afp_req + 11, source_len), -result, source_entry_id));
|
||||
return(result);
|
||||
}
|
||||
|
||||
@@ -1395,9 +1405,9 @@ static int afp_rename_object(uint8 *afp_req, int afp_len,
|
||||
afp_req + dest_len_off + 1, dest_len,
|
||||
dest_path, sizeof(dest_path));
|
||||
if (result < 0) {
|
||||
XDPRINTF((2,0, "%s dest path build failed: vol=%d base=0x%08x path='%s' result=-0x%x",
|
||||
call_name, (int)volume_number, dest_entry_id,
|
||||
visable_data(afp_req + dest_len_off + 1, dest_len), -result));
|
||||
XDPRINTF((2,0, "WARN MAP 35/7 FAIL reason=dest_path_build vol=%d base=%u path='%s' result=0x%x fn=0x23 sub=0x07 base_hex=0x%08x",
|
||||
(int)volume_number, dest_entry_id,
|
||||
visable_data(afp_req + dest_len_off + 1, dest_len), -result, dest_entry_id));
|
||||
return(result);
|
||||
}
|
||||
|
||||
@@ -1405,10 +1415,10 @@ static int afp_rename_object(uint8 *afp_req, int afp_len,
|
||||
source_path, strlen((char *)source_path));
|
||||
if (volume < 0) return(volume);
|
||||
if (stat(source_unixname, &stbuff)) {
|
||||
XDPRINTF((2,0, "%s source stat failed: vol=%d source_base=0x%08x path='%s' mars_path='%s' unix='%s' errno=%d",
|
||||
call_name, (int)volume_number, source_entry_id,
|
||||
XDPRINTF((2,0, "WARN FILE 35/7 FAIL reason=source_stat vol=%d source_base=%u path='%s' mars_path='%s' unix='%s' errno=%d fn=0x23 sub=0x07 source_base_hex=0x%08x result=0x9c",
|
||||
(int)volume_number, source_entry_id,
|
||||
visable_data(afp_req + 11, source_len), source_path,
|
||||
source_unixname, errno));
|
||||
source_unixname, errno, source_entry_id));
|
||||
return(-0x9c);
|
||||
}
|
||||
|
||||
@@ -1429,17 +1439,17 @@ static int afp_rename_object(uint8 *afp_req, int afp_len,
|
||||
0, dest_path, strlen((char *)dest_path));
|
||||
}
|
||||
if (result < 0) {
|
||||
XDPRINTF((2,0, "%s rename failed: vol=%d source_base=0x%08x dest_base=0x%08x source='%s' dest='%s' result=-0x%x",
|
||||
call_name, (int)volume_number, source_entry_id, dest_entry_id,
|
||||
source_path, dest_path, -result));
|
||||
XDPRINTF((2,0, "WARN FILE 35/7 FAIL reason=rename vol=%d source_base=%u dest_base=%u source='%s' dest='%s' result=0x%x fn=0x23 sub=0x07 source_base_hex=0x%08x dest_base_hex=0x%08x",
|
||||
(int)volume_number, source_entry_id, dest_entry_id,
|
||||
source_path, dest_path, -result, source_entry_id, dest_entry_id));
|
||||
return(result);
|
||||
}
|
||||
|
||||
XDPRINTF((3,0, "%s: request_vol=%d resolved_vol=%d source_base=0x%08x dest_base=0x%08x source='%s' dest='%s' directory=%d",
|
||||
call_name, (int)volume_number, volume, source_entry_id, dest_entry_id,
|
||||
XDPRINTF((3,0, "INFO AFP 35/7 DONE request_vol=%d resolved_vol=%d source_base=%u dest_base=%u source='%s' dest='%s' directory=%d fn=0x23 sub=0x07 source_base_hex=0x%08x dest_base_hex=0x%08x",
|
||||
(int)volume_number, volume, source_entry_id, dest_entry_id,
|
||||
visable_data(afp_req + 11, source_len),
|
||||
visable_data(afp_req + dest_len_off + 1, dest_len),
|
||||
S_ISDIR(stbuff.st_mode) ? 1 : 0));
|
||||
S_ISDIR(stbuff.st_mode) ? 1 : 0, source_entry_id, dest_entry_id));
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user