1*45cfc384SAndrew Jeffery /* 2*45cfc384SAndrew Jeffery * Mailbox Daemon Temporary File helpers 3*45cfc384SAndrew Jeffery * 4*45cfc384SAndrew Jeffery * Copyright 2017 IBM 5*45cfc384SAndrew Jeffery * 6*45cfc384SAndrew Jeffery * Licensed under the Apache License, Version 2.0 (the "License"); 7*45cfc384SAndrew Jeffery * you may not use this file except in compliance with the License. 8*45cfc384SAndrew Jeffery * You may obtain a copy of the License at 9*45cfc384SAndrew Jeffery * 10*45cfc384SAndrew Jeffery * http://www.apache.org/licenses/LICENSE-2.0 11*45cfc384SAndrew Jeffery * 12*45cfc384SAndrew Jeffery * Unless required by applicable law or agreed to in writing, software 13*45cfc384SAndrew Jeffery * distributed under the License is distributed on an "AS IS" BASIS, 14*45cfc384SAndrew Jeffery * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15*45cfc384SAndrew Jeffery * See the License for the specific language governing permissions and 16*45cfc384SAndrew Jeffery * limitations under the License. 17*45cfc384SAndrew Jeffery * 18*45cfc384SAndrew Jeffery */ 19*45cfc384SAndrew Jeffery 20*45cfc384SAndrew Jeffery #ifndef MBOX_TEST_UTILS_H 21*45cfc384SAndrew Jeffery #define MBOX_TEST_UTILS_H 22*45cfc384SAndrew Jeffery 23*45cfc384SAndrew Jeffery #include <linux/limits.h> 24*45cfc384SAndrew Jeffery 25*45cfc384SAndrew Jeffery struct tmpf { 26*45cfc384SAndrew Jeffery int fd; 27*45cfc384SAndrew Jeffery char path[PATH_MAX]; 28*45cfc384SAndrew Jeffery }; 29*45cfc384SAndrew Jeffery 30*45cfc384SAndrew Jeffery int tmpf_init(struct tmpf *tmpf, const char *template); 31*45cfc384SAndrew Jeffery 32*45cfc384SAndrew Jeffery void tmpf_destroy(struct tmpf *tmpf); 33*45cfc384SAndrew Jeffery 34*45cfc384SAndrew Jeffery #endif /* MBOX_TEST_UTILS_H */ 35