MCPcopy Create free account
hub / github.com/apache/nuttx / convert_path

Function convert_path

tools/cnvwindeps.c:131–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131static bool convert_path(const char *winpath)
132{
133 ssize_t size;
134 ssize_t ret;
135 bool quoted;
136
137 quoted = dequote_path(winpath);
138
139 size = cygwin_conv_path(CCP_WIN_A_TO_POSIX | CCP_RELATIVE,
140 g_dequoted, NULL, 0);
141 if (size > MAX_PATH)
142 {
143 fprintf(stderr, "%lu: POSIX path too long: %lu\n",
144 g_lineno, (unsigned long)size);
145 exit(EXIT_FAILURE);
146 }
147
148 ret = cygwin_conv_path(CCP_WIN_A_TO_POSIX | CCP_RELATIVE,
149 g_dequoted, g_posix, MAX_PATH);
150 if (ret < 0)
151 {
152 fprintf(stderr, "%lu: cygwin_conv_path '%s' failed: %s\n",
153 g_lineno, g_dequoted, strerror(errno));
154 exit(EXIT_FAILURE);
155 }
156
157 return quoted;
158}
159
160static void show_usage(const char *progname)
161{

Callers 1

mainFunction · 0.70

Calls 4

fprintfFunction · 0.85
exitFunction · 0.85
strerrorFunction · 0.85
dequote_pathFunction · 0.70

Tested by

no test coverage detected