Lines Matching refs:rc
90 int rc; in smb_reparse_svcadd() local
92 if ((rc = smb_reparse_init(path, &nvl)) != 0) in smb_reparse_svcadd()
93 return (rc); in smb_reparse_svcadd()
95 if ((rc = reparse_add(nvl, svctype, svcdata)) != 0) { in smb_reparse_svcadd()
97 return (rc); in smb_reparse_svcadd()
100 rc = smb_reparse_set(path, nvl); in smb_reparse_svcadd()
103 return (rc); in smb_reparse_svcadd()
115 int rc; in smb_reparse_svcdel() local
117 if ((rc = smb_reparse_init(path, &nvl)) != 0) in smb_reparse_svcdel()
118 return (rc); in smb_reparse_svcdel()
120 if ((rc = reparse_remove(nvl, svctype)) != 0) { in smb_reparse_svcdel()
122 return (rc); in smb_reparse_svcdel()
127 rc = reparse_delete(path); in smb_reparse_svcdel()
128 if ((rc != 0) && (rc == ENOENT)) in smb_reparse_svcdel()
129 rc = 0; in smb_reparse_svcdel()
131 rc = smb_reparse_set(path, nvl); in smb_reparse_svcdel()
135 return (rc); in smb_reparse_svcdel()
153 int rc; in smb_reparse_svcget() local
155 if ((rc = smb_reparse_init(path, &nvl)) != 0) in smb_reparse_svcget()
156 return (rc); in smb_reparse_svcget()
158 rc = ENODATA; in smb_reparse_svcget()
165 if ((rc = nvpair_value_string(nvp, &sdata)) != 0) in smb_reparse_svcget()
170 rc = ENOMEM; in smb_reparse_svcget()
173 rc = 0; in smb_reparse_svcget()
180 return (rc); in smb_reparse_svcget()
200 int rc; in smb_reparse_init() local
206 if ((rc = readlink(path, rp_data, MAXREPARSELEN)) == -1) { in smb_reparse_init()
214 if ((rc = reparse_parse(rp_data, *nvl)) != 0) { in smb_reparse_init()
216 return (rc); in smb_reparse_init()
240 int rc; in smb_reparse_set() local
242 if ((rc = reparse_unparse(nvl, &rp_data)) != 0) in smb_reparse_set()
243 return (rc); in smb_reparse_set()
245 rc = reparse_delete(path); in smb_reparse_set()
246 if ((rc != 0) && (rc != ENOENT)) { in smb_reparse_set()
248 return (rc); in smb_reparse_set()
251 rc = reparse_create(path, rp_data); in smb_reparse_set()
254 return (rc); in smb_reparse_set()