Commit 3e0b09b1 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

sk-unix: protobuf -- Use string type instead of bytestream

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 48dbef3e
......@@ -44,5 +44,5 @@ message unix_sk_entry {
/*
* Relative socket name may have prefix.
*/
optional bytes name_dir = 14;
optional string name_dir = 14;
}
......@@ -294,9 +294,7 @@ static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p)
if (sk->rel_name) {
if (resolve_rel_name(sk, p))
goto err;
ue->has_name_dir = true;
ue->name_dir.len = (size_t)strlen(sk->rel_name->dir) + 1;
ue->name_dir.data = (void *)sk->rel_name->dir;
ue->name_dir = sk->rel_name->dir;
}
/*
......@@ -1199,9 +1197,7 @@ static int collect_one_unixsk(void *o, ProtobufCMessage *base)
struct unix_sk_info *ui = o;
ui->ue = pb_msg(base, UnixSkEntry);
if (ui->ue->has_name_dir)
ui->name_dir = (void *)ui->ue->name_dir.data;
ui->name_dir = (void *)ui->ue->name_dir;
if (ui->ue->name.len) {
if (ui->ue->name.len >= UNIX_PATH_MAX) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment