Subversion Repositories HelenOS

Rev

Rev 4116 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4116 Rev 4446
Line 1... Line 1...
1
/*
1
/*
2
 * Copyright (c) 2006 Jakub Jermar
2
 * Copyright (c) 2009 Martin Decky
3
 * All rights reserved.
3
 * All rights reserved.
4
 *
4
 *
5
 * Redistribution and use in source and binary forms, with or without
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
6
 * modification, are permitted provided that the following conditions
7
 * are met:
7
 * are met:
Line 24... Line 24...
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
/** @addtogroup init
29
/** @addtogroup getvc
30
 * @{
30
 * @{
31
 */
31
 */
32
/**
32
/**
33
 * @file
33
 * @file
34
 */
34
 */
35
 
35
 
36
#include <unistd.h>
36
#include <unistd.h>
37
#include <stdio.h>
37
#include <stdio.h>
38
#include <macros.h>
38
#include <macros.h>
39
#include "init.h"
39
#include "getvc.h"
40
#include "version.h"
40
#include "version.h"
41
 
41
 
42
char *release = STRING(RELEASE);
42
static char *release = STRING(RELEASE);
-
 
43
static char *name = STRING(NAME);
-
 
44
static char *arch = STRING(UARCH);
43
 
45
 
44
#ifdef REVISION
46
#ifdef REVISION
45
    char *revision = ", revision " STRING(REVISION);
47
    static char *revision = ", revision " STRING(REVISION);
46
#else
48
#else
47
    char *revision = "";
49
    static char *revision = "";
48
#endif
50
#endif
49
 
51
 
50
#ifdef TIMESTAMP
52
#ifdef TIMESTAMP
51
    char *timestamp = "\nBuilt on " STRING(TIMESTAMP);
53
    static char *timestamp = "\nBuilt on " STRING(TIMESTAMP);
52
#else
54
#else
53
    char *timestamp = "";
55
    static char *timestamp = "";
54
#endif
56
#endif
55
 
57
 
56
void info_print(void)
-
 
57
{
-
 
58
    printf(NAME ": HelenOS init\n");
-
 
59
}
-
 
60
 
-
 
61
/** Print version information. */
58
/** Print version information. */
62
void version_print(void)
59
void version_print(const char *vc)
63
{
60
{
64
    printf("HelenOS init\nRelease %s%s%s\n", release, revision, timestamp);
61
    printf("HelenOS release %s (%s)%s%s\n", release, name, revision, timestamp);
-
 
62
    printf("Running on %s (%s)\n", arch, vc);
65
    printf("Copyright (c) 2001-2009 HelenOS project\n");
63
    printf("Copyright (c) 2001-2009 HelenOS project\n\n");
66
}
64
}
67
 
65
 
68
/** @}
66
/** @}
69
 */
67
 */