Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
6c579abb
Commit
6c579abb
authored
May 11, 2010
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ccanlint: put generated _info in correct directory.
parent
90e94990
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
tools/ccanlint/compulsory_tests/has_info.c
tools/ccanlint/compulsory_tests/has_info.c
+7
-4
No files found.
tools/ccanlint/compulsory_tests/has_info.c
View file @
6c579abb
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include <err.h>
#include <err.h>
#include <string.h>
#include <string.h>
#include <ccan/noerr/noerr.h>
#include <ccan/noerr/noerr.h>
#include <ccan/talloc/talloc.h>
static
void
*
check_has_info
(
struct
manifest
*
m
,
unsigned
int
*
timeleft
)
static
void
*
check_has_info
(
struct
manifest
*
m
,
unsigned
int
*
timeleft
)
{
{
...
@@ -55,17 +56,19 @@ static const char template[] =
...
@@ -55,17 +56,19 @@ static const char template[] =
static
void
create_info_template
(
struct
manifest
*
m
,
void
*
check_result
)
static
void
create_info_template
(
struct
manifest
*
m
,
void
*
check_result
)
{
{
FILE
*
info
;
FILE
*
info
;
const
char
*
filename
;
if
(
!
ask
(
"Should I create a template _info file for you?"
))
if
(
!
ask
(
"Should I create a template _info file for you?"
))
return
;
return
;
info
=
fopen
(
"_info"
,
"w"
);
filename
=
talloc_asprintf
(
m
,
"%s/%s"
,
m
->
dir
,
"_info"
);
info
=
fopen
(
filename
,
"w"
);
if
(
!
info
)
if
(
!
info
)
err
(
1
,
"Trying to create a template _info
"
);
err
(
1
,
"Trying to create a template _info
in %s"
,
filename
);
if
(
fprintf
(
info
,
template
,
m
->
basename
)
<
0
)
{
if
(
fprintf
(
info
,
template
,
m
->
basename
)
<
0
)
{
unlink_noerr
(
"_info"
);
unlink_noerr
(
filename
);
err
(
1
,
"Writing template into
_info"
);
err
(
1
,
"Writing template into
%s"
,
filename
);
}
}
fclose
(
info
);
fclose
(
info
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment