* [PATCH] use macro for tmp file path
@ 2010-05-21 16:51 Smith, Stan
[not found] ` <3F6F638B8D880340AB536D29CD4C1E192562EBBB00-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Smith, Stan @ 2010-05-21 16:51 UTC (permalink / raw)
To: Sasha Khapyorsky
Cc: ofw-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Use defined macro for tmp file path
signed-off-by: stan smith <stan.smith-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
diff --git a/opensm/opensm/st.c b/opensm/opensm/st.c
index ea76038..2d39117 100644
--- a/opensm/opensm/st.c
+++ b/opensm/opensm/st.c
@@ -174,7 +174,7 @@ static int init_st = 0;
static void stat_col()
{
- FILE *f = fopen("/var/log/osm_st_col", "w");
+ FILE *f = fopen( OSM_DEFAULT_TMP_DIR "osm_st_col", "w");
fprintf(f, "collision: %d\n", collision);
fclose(f);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <3F6F638B8D880340AB536D29CD4C1E192562EBBB00-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>]
* Re: [PATCH] use macro for tmp file path [not found] ` <3F6F638B8D880340AB536D29CD4C1E192562EBBB00-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org> @ 2010-05-25 11:02 ` Sasha Khapyorsky 2010-05-25 15:25 ` Smith, Stan 0 siblings, 1 reply; 3+ messages in thread From: Sasha Khapyorsky @ 2010-05-25 11:02 UTC (permalink / raw) To: Smith, Stan Cc: ofw-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 09:51 Fri 21 May , Smith, Stan wrote: > > Use defined macro for tmp file path > > signed-off-by: stan smith <stan.smith-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > The patch is whitespece-mangled. > diff --git a/opensm/opensm/st.c b/opensm/opensm/st.c > index ea76038..2d39117 100644 > --- a/opensm/opensm/st.c > +++ b/opensm/opensm/st.c > @@ -174,7 +174,7 @@ static int init_st = 0; > > static void stat_col() > { > - FILE *f = fopen("/var/log/osm_st_col", "w"); > + FILE *f = fopen( OSM_DEFAULT_TMP_DIR "osm_st_col", "w"); I think it was discussed somehow in the past. Shouldn't this be: OSM_DEFAULT_TMP_DIR "/osm_st_col" , so that trailing '/' will not be mandatory in directory define? Sasha > fprintf(f, "collision: %d\n", collision); > fclose(f); > } > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] use macro for tmp file path 2010-05-25 11:02 ` Sasha Khapyorsky @ 2010-05-25 15:25 ` Smith, Stan 0 siblings, 0 replies; 3+ messages in thread From: Smith, Stan @ 2010-05-25 15:25 UTC (permalink / raw) To: Sasha Khapyorsky Cc: ofw-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Sasha Khapyorsky wrote: > On 09:51 Fri 21 May , Smith, Stan wrote: >> >> Use defined macro for tmp file path >> >> signed-off-by: stan smith <stan.smith-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> >> > > The patch is whitespece-mangled. > >> diff --git a/opensm/opensm/st.c b/opensm/opensm/st.c >> index ea76038..2d39117 100644 >> --- a/opensm/opensm/st.c >> +++ b/opensm/opensm/st.c >> @@ -174,7 +174,7 @@ static int init_st = 0; >> >> static void stat_col() >> { >> - FILE *f = fopen("/var/log/osm_st_col", "w"); >> + FILE *f = fopen( OSM_DEFAULT_TMP_DIR "osm_st_col", "w"); > > I think it was discussed somehow in the past. > > Shouldn't this be: > > OSM_DEFAULT_TMP_DIR "/osm_st_col" > > , so that trailing '/' will not be mandatory in directory define? Currently OSM_DEFAULT_TMP_DIR is defined with a trailing directory delimiter. Having the delimiter in the OSM_DEFAULT_TMP_DIR makes it easier to be consistent with \ or /. Will resend this patch as I think I've figured out the mangled email story. > > Sasha > >> fprintf(f, "collision: %d\n", collision); >> fclose(f); >> } >> -- >> To unsubscribe from this list: send the line "unsubscribe >> linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-25 15:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-21 16:51 [PATCH] use macro for tmp file path Smith, Stan
[not found] ` <3F6F638B8D880340AB536D29CD4C1E192562EBBB00-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-05-25 11:02 ` Sasha Khapyorsky
2010-05-25 15:25 ` Smith, Stan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox