File tree Expand file tree Collapse file tree 4 files changed +38
-2
lines changed
Expand file tree Collapse file tree 4 files changed +38
-2
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,12 @@ lint:
3232 @rc=0 ; for f in $$ (find -name \* .go | grep -v \.\/ vendor) ; do golint -set_exit_status $$ f || rc=1 ; done ; exit $$ rc
3333
3434$(cmds ) :
35- cd cmd/$@ ; go build
35+ cd cmd/$@ ; $( GO ) build
3636
3737build : $(cmds )
3838
3939clean :
40- @for cmd in $(cmds ) ; do pwd=$(shell pwd) ; cd cmd/$$ cmd ; go clean ; cd $$ pwd ; done
40+ @for cmd in $(cmds ) ; do pwd=$(shell pwd) ; cd cmd/$$ cmd ; $( GO ) clean ; cd $$ pwd ; done
4141
4242TAG? =$(shell git rev-parse HEAD)
4343
Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ // +build kerneldrv
16+
1517package kerneldrv
1618
1719import (
Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ // +build kerneldrv
16+
1517package kerneldrv
1618
1719import (
Original file line number Diff line number Diff line change 1+ // Copyright 2019 Intel Corporation. All Rights Reserved.
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+
15+ // +build !kerneldrv
16+
17+ package kerneldrv
18+
19+ import (
20+ "fmt"
21+ "os"
22+
23+ dpapi "github.com/intel/intel-device-plugins-for-kubernetes/pkg/deviceplugin"
24+ )
25+
26+ // NewDevicePlugin creates a non-functional stub for kernel mode device plugins.
27+ func NewDevicePlugin () dpapi.Scanner {
28+ fmt .Println ("kernel mode is not supported in this build. Use 'kerneldrv' build tag to have this mode enabled. Exiting..." )
29+ os .Exit (1 )
30+
31+ return nil
32+ }
You can’t perform that action at this time.
0 commit comments