about summary refs log tree commit diff stats
path: root/src/packet.c
blob: 5bc8be687f91f3699709d7b7ffc24cf11ca82063 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "packet.h"

char *nbd_tftp_error_to_message(nbd_tftp_ecode error) {
	switch (error) {
		case 0:
			return "ERROR";
		case 1:
			return "File not Found";
		case 2:
			return "Access violation";
		case 3:
			return "Disk full or allocation exceeded";
		case 4:
			return "Illegal TFTP operation";
		case 5:
			return "Unknown Transfer ID";
		case 6:
			return "File already exists";
		case 7:
			return "No such user";
	}
	return "UNKNOWN ERROR";
}