summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-11-17 20:50:07 +0000
committerJeremy Allison <jra@samba.org>1998-11-17 20:50:07 +0000
commit768761820e8d7481c586c4e0ab4ac7cb36d18c4b (patch)
tree675f36b6854bfccca433842e68e0df4b86cda575 /source3/utils
parentbb5bea4e195eaf5776284c027d667812b7365b56 (diff)
downloadsamba-768761820e8d7481c586c4e0ab4ac7cb36d18c4b.tar.gz
samba-768761820e8d7481c586c4e0ab4ac7cb36d18c4b.tar.bz2
samba-768761820e8d7481c586c4e0ab4ac7cb36d18c4b.zip
Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.
Tidied up some of the mess (no other word for it). Still doesn't compile cleanly. There are calls with incorrect parameters that don't seem to be doing the right thing. This code still needs surgery :-(. Jeremy. (This used to be commit 18ff93a9abbf68ee8c59c0af3e57c63e4a015dac)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/make_printerdef.c2
-rw-r--r--source3/utils/make_smbcodepage.c8
-rw-r--r--source3/utils/status.c2
-rw-r--r--source3/utils/testprns.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/source3/utils/make_printerdef.c b/source3/utils/make_printerdef.c
index c64ce64bbf..68b603bf1f 100644
--- a/source3/utils/make_printerdef.c
+++ b/source3/utils/make_printerdef.c
@@ -471,7 +471,7 @@ int main(int argc, char *argv[])
return(-1);
}
- inf_file=fopen(argv[1],"r");
+ inf_file=sys_fopen(argv[1],"r");
if (!inf_file)
{
fprintf(stderr,"Description file not found, bye\n");
diff --git a/source3/utils/make_smbcodepage.c b/source3/utils/make_smbcodepage.c
index 0653fd31f1..a57af2fc44 100644
--- a/source3/utils/make_smbcodepage.c
+++ b/source3/utils/make_smbcodepage.c
@@ -190,7 +190,7 @@ The maximum size I will believe is 100k.\n", prog_name, size);
exit(1);
}
- if((fp = fopen(input_file, "r")) == NULL)
+ if((fp = sys_fopen(input_file, "r")) == NULL)
{
fprintf(stderr, "%s: cannot open file %s for input.\n", prog_name, input_file);
exit(1);
@@ -283,7 +283,7 @@ definition file. File %s has %d.\n", prog_name, MAXCODEPAGELINES, input_file, nu
}
/* Now write out the output_buf. */
- if((fp = fopen(output_file, "w"))==NULL)
+ if((fp = sys_fopen(output_file, "w"))==NULL)
{
fprintf(stderr, "%s: Cannot open output file %s. Error was %s.\n",
prog_name, output_file, strerror(errno));
@@ -339,7 +339,7 @@ code page file.\n", prog_name, input_file);
is held in little endian format.
*/
- if((fp = fopen( input_file, "r")) == NULL)
+ if((fp = sys_fopen( input_file, "r")) == NULL)
{
fprintf(stderr, "%s: cannot open file %s. Error was %s\n",
prog_name, input_file, strerror(errno));
@@ -411,7 +411,7 @@ multiple of 4.\n", prog_name, input_file);
fclose(fp);
/* Now dump the codepage into an ascii file. */
- if((fp = fopen(output_file, "w")) == NULL)
+ if((fp = sys_fopen(output_file, "w")) == NULL)
{
fprintf(stderr, "%s: cannot open file %s. Error was %s\n",
prog_name, output_file, strerror(errno));
diff --git a/source3/utils/status.c b/source3/utils/status.c
index fa1e8b43bf..96df087858 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -211,7 +211,7 @@ static void print_share_mode(share_mode_entry *e, char *fname)
trim_string(fname,"","/");
pstrcat(fname,"/STATUS..LCK");
- f = fopen(fname,"r");
+ f = sys_fopen(fname,"r");
if (!f) {
printf("Couldn't open status file %s\n",fname);
if (!lp_status(-1))
diff --git a/source3/utils/testprns.c b/source3/utils/testprns.c
index caa9e2740a..c03fa0436a 100644
--- a/source3/utils/testprns.c
+++ b/source3/utils/testprns.c
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
printf("Usage: testprns printername [printcapfile]\n");
else
{
- dbf = fopen("test.log", "w");
+ dbf = sys_fopen("test.log", "w");
if (dbf == NULL) {
printf("Unable to open logfile.\n");
} else {