145cfc384SAndrew Jeffery /* 245cfc384SAndrew Jeffery * Mailbox Daemon Temporary File helpers 345cfc384SAndrew Jeffery * 445cfc384SAndrew Jeffery * Copyright 2017 IBM 545cfc384SAndrew Jeffery * 645cfc384SAndrew Jeffery * Licensed under the Apache License, Version 2.0 (the "License"); 745cfc384SAndrew Jeffery * you may not use this file except in compliance with the License. 845cfc384SAndrew Jeffery * You may obtain a copy of the License at 945cfc384SAndrew Jeffery * 1045cfc384SAndrew Jeffery * http://www.apache.org/licenses/LICENSE-2.0 1145cfc384SAndrew Jeffery * 1245cfc384SAndrew Jeffery * Unless required by applicable law or agreed to in writing, software 1345cfc384SAndrew Jeffery * distributed under the License is distributed on an "AS IS" BASIS, 1445cfc384SAndrew Jeffery * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1545cfc384SAndrew Jeffery * See the License for the specific language governing permissions and 1645cfc384SAndrew Jeffery * limitations under the License. 1745cfc384SAndrew Jeffery * 1845cfc384SAndrew Jeffery */ 1945cfc384SAndrew Jeffery 2045cfc384SAndrew Jeffery #ifndef MBOX_TEST_UTILS_H 2145cfc384SAndrew Jeffery #define MBOX_TEST_UTILS_H 2245cfc384SAndrew Jeffery 2345cfc384SAndrew Jeffery #include <linux/limits.h> 2445cfc384SAndrew Jeffery 2545cfc384SAndrew Jeffery struct tmpf { 2645cfc384SAndrew Jeffery int fd; 2745cfc384SAndrew Jeffery char path[PATH_MAX]; 2845cfc384SAndrew Jeffery }; 2945cfc384SAndrew Jeffery 30*90b92fe4SRatan Gupta int tmpf_init(struct tmpf *tmpf, const char *template_str); 3145cfc384SAndrew Jeffery 3245cfc384SAndrew Jeffery void tmpf_destroy(struct tmpf *tmpf); 3345cfc384SAndrew Jeffery 3445cfc384SAndrew Jeffery #endif /* MBOX_TEST_UTILS_H */ 35