diff mbox series

[v2,05/20] trace: use local path for local headers

Message ID 1527266793-301361-6-git-send-email-mst@redhat.com
State New
Headers show
Series include cleanups | expand

Commit Message

Michael S. Tsirkin May 25, 2018, 4:47 p.m. UTC
When pulling in headers that are in the same directory as C file (as
opposed to one in include/), we should use its relative path, without a
directory.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 trace/control.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé May 25, 2018, 9:29 p.m. UTC | #1
On 05/25/2018 01:47 PM, Michael S. Tsirkin wrote:
> When pulling in headers that are in the same directory as C file (as
> opposed to one in include/), we should use its relative path, without a
> directory.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

This reminds me of this project:

https://github.com/noidontdig/gitdown

    gitdown is a script which moderates your git
    committing activity based on your blood alcohol
    content (BAC).

:P

> ---
>  trace/control.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/trace/control.h b/trace/control.h
> index 1903e22..eb65c8e 100644
> --- a/trace/control.h
> +++ b/trace/control.h
> @@ -267,6 +267,6 @@ char *trace_opt_parse(const char *optarg);
>  uint32_t trace_get_vcpu_event_count(void);
>  
>  
> -#include "trace/control-internal.h"
> +#include "control-internal.h"
>  
>  #endif /* TRACE__CONTROL_H */
>
Michael S. Tsirkin May 25, 2018, 9:49 p.m. UTC | #2
On Fri, May 25, 2018 at 06:29:29PM -0300, Philippe Mathieu-Daudé wrote:
> On 05/25/2018 01:47 PM, Michael S. Tsirkin wrote:
> > When pulling in headers that are in the same directory as C file (as
> > opposed to one in include/), we should use its relative path, without a
> > directory.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> > Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> > Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 
> This reminds me of this project:
> 
> https://github.com/noidontdig/gitdown
> 
>     gitdown is a script which moderates your git
>     committing activity based on your blood alcohol
>     content (BAC).
> 
> :P

Oh I have a script that attaches signatures, and it does not check for duplicates.

I started rewriting it using git interpret-trailers but Junio asked me
to rework interpret-trailers first and I didn't bother yet.

> > ---
> >  trace/control.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/trace/control.h b/trace/control.h
> > index 1903e22..eb65c8e 100644
> > --- a/trace/control.h
> > +++ b/trace/control.h
> > @@ -267,6 +267,6 @@ char *trace_opt_parse(const char *optarg);
> >  uint32_t trace_get_vcpu_event_count(void);
> >  
> >  
> > -#include "trace/control-internal.h"
> > +#include "control-internal.h"
> >  
> >  #endif /* TRACE__CONTROL_H */
> >
diff mbox series

Patch

diff --git a/trace/control.h b/trace/control.h
index 1903e22..eb65c8e 100644
--- a/trace/control.h
+++ b/trace/control.h
@@ -267,6 +267,6 @@  char *trace_opt_parse(const char *optarg);
 uint32_t trace_get_vcpu_event_count(void);
 
 
-#include "trace/control-internal.h"
+#include "control-internal.h"
 
 #endif /* TRACE__CONTROL_H */